Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AmandaEly 123 posts 379 karma points
    Aug 27, 2015 @ 12:34
    AmandaEly
    0

    Troubles getting GetCropUrl Anchor to work

    Hi,

    There really isn't much documentation on this feature is there? There is the ImageProcessor website but I can't find stuff on the correct way to use parameters.

    So: var randomImageUrl = umbracoHelper.TypedMedia(a.RandomPhotoId).GetCropUrl(200,200,"umbracoFile","Gallery",50,ImageCropMode.Crop, ImageCropAnchor.Top); img src="@randomImageUrl" alt="Randomly chosen image from the album"

    Produces: img src="/media/83866/10kHandicap2012_002.jpg?anchor=center&mode=crop&quality=50&width=200&height=200&rnd=130734252240000000" alt="Randomly chosen image from the album"

    I removed the pointy brackets so you could see the code. They are there in real life.

    n.b, the anchor is in the centre, cutting off heads. I requested top. Any ideas how to fix this, and preferably with fewer parameters?

    I have thousands of images, so I can't set each focal point myself.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies