Copied to clipboard

Flag this post as spam?

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


  • Simon Andersson 6 posts 27 karma points
    Jun 02, 2015 @ 16:23
    Simon Andersson
    0

    Image not rendering when using Image Cropper

    Hey,

    I have problems with the image cropper when the image is rendering. I'm using Umbraco 7.1.2 and tried to upgrade to a newer version (all the way up to 7.2.5) with no success.

    I use the Multi Node Tree Picker to pick the image file (reason for that is that I want to limit access to a specific media type which holds the Image Cropper). I even tried to switch this property to a Media Picker with the same results.

    The image crop is rendering properly when the croped image is untouched and the url is like this:

    /media/1097/image1.jpg?anchor=center&mode=crop&width=425&height=275&rnd=130554448470000000

    However, if I for example change the focal point or scale the crop I will get a url like this which is not rendering at all:

    /media/1155/image1.jpg?crop=0.008179679144385027,0,0.12272941176470581,0&cropmode=percentage&width=425&height=275&rnd=130777109000000000

     

    To get my crop I do like this in code where "image" is my Multi Node Tree Picker which is limited to only 1 item and only of media type "Cropped Image":

    var image = Umbraco.Media(CurrentPage.GetPropertyValue("image"));
    var cropUrl = image.GetCropUrl("largeImage");
    <img class="img-responsive" src="@cropUrl" alt="@Umbraco.Media(CurrentPage.GetPropertyValue("image")).Name" />

    What could be wrong, any ideas?

  • Simon Andersson 6 posts 27 karma points
    Jun 03, 2015 @ 08:35
    Simon Andersson
    0

    Ok, I solved this problem. Problem was the Image Resizer plugin.

  • 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