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 15, 2015 @ 13:25
    AmandaEly
    0

    GetCropUrl not returning a crop

    Hi,

    I am using version 7.2.8 and attempting to reduce the size of a lot of images via crops. Following Jeavon's famous uHangout, I have assigned all images in the media folder to be imagecropper. I have chosen two crops. Currently I am attempting to use the correct crop for the site logo.

    var home = Model.Content.AncestorOrSelf("Home"); var tryUrl = home.GetCropUrl("siteLogo", "Logo");

    The url is "66456?mode=pad&rnd=130839465900000000", which does not point to anyting on my media folder and does not contain any crop information.

    so I try var siteLogo = Umbraco.Media(home.GetPropertyValue

    var url = siteLogo.GetCropUrl("umbracoFile", "Logo"); 
    

    Which looks like the best option, just returns null.

    I have checked the ImageProcessor version and fought with the config files, only to return them to the same state in the 7.2.8 download.

    It flat out doesn't work.

  • AmandaEly 123 posts 379 karma points
    Aug 15, 2015 @ 13:44
    AmandaEly
    0

    I wept over this for a whole day on Thursday. Nothing like user error, is there? My crop is called "Icon", not "Logo".

    @{ var home = Model.Content.AncestorOrSelf("Home"); var siteLogoUrl = Umbraco.Media(home.GetPropertyValue

    Works fine. A bit roundabout, since it won't go directly from the homepage property but that is ok.

  • 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