Copied to clipboard

Flag this post as spam?

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


  • David Armitage 222 posts 857 karma points
    14 days ago
    David Armitage
    0

    Umbraco 8 Image Cropper Isn't Rendering to the Frontend

    Hi Guys,

    Is anyone else experiencing issues with the image cropper?

    I think there is a bug or at least there seems to be on two sites I have tested on Umbraco 8.

    <h5>STANDARD IMAGE</h5>
    <img src="@Model.Image.Url" width="300" />
    
    <h5>CROPPED IMAGE</h5>
    <img src="@Model.Image.GetCropUrl("banner")" />
    

    So the first image displays and the second doesn't. This is very simple stuff and I have used this a million times with Umbraco 7 so I am pretty sure the setup is correct unless something has changes with version 8 which I don't think was mentioned in the bridging course.

    1. The image cropper has been created.

    2. To confirm I can see the image cropper in the media section and it seems to be functioning as expected.

    3. I have doubled checked the crop alias is correct.

    4. The image used is a basic jpg. Nothing unusual going on.

    Thanks in advanced.

    David

  • David Armitage 222 posts 857 karma points
    14 days ago
    David Armitage
    0

    Hi,

    To add some extra information. This issue only seems to be happening for existing images. So images that were already saved in the media section prior to me adding the cropper.

    My guess is this may have changed in v8 and this no longer happens on the fly and instead is cropped when the user uploads. I am pretty sure this wasn't the case with v7 but I may be wrong.

    Any image that I upload after the crop has been created seems to work fine. I guess I need to make sure all crops have been created before uploading any images. Not really ideal but if it increases page speed I guess it's a good thing.

  • Nik 1164 posts 4849 karma points MVP 2x c-trib
    1 week ago
    Nik
    0

    Pretty sure it's a bug, it's really annoying as well. Need to do some reproduction tests and then log it on the issue tracker as I don't think it's on there.

  • David Armitage 222 posts 857 karma points
    6 days ago
    David Armitage
    0

    Hi Guys,

    I tested a little more and from what I have found is the problem is also there even if you upload images after the cropper has been added.

    The only why I could get the cropper to work is..

    1. Create the cropper first.

    2. Then upload an image.

    3. I rendered the image using the crop URL to the front-end as usual at this point the cropper is still not working. Instead it just renders the uncropped original version of the image.

    4. I then have to go into the media section and select the image that is not rendering the cropped version correctly. To get it to work I have to edit the crop slightly. Either by changing the zoom or drag the crop selection around. Once this is done the image needs saving.

    5. Now when I refresh the front-end the crop is working. I looked at the source and I can see that there has been some extra stuff added to the image. There is some coordinates that were not there before.

    My thoughts on this is it is definitely a bug. I cant see why this would be done by design. The cropper worked perfectly in 7 and these problems did not exist. I am quite sure about that since I use the cropper on every project.

    Does anyone know where I should be logging this as a bug with Umbraco?

    Kind Regards

    David

Please Sign in or register to post replies

Write your reply to:

Draft