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 508 posts 2078 karma points
    Jan 05, 2020 @ 04:57
    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 508 posts 2078 karma points
    Jan 05, 2020 @ 05:09
    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 1614 posts 7260 karma points MVP 7x c-trib
    Jan 05, 2020 @ 17:03
    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 508 posts 2078 karma points
    Jan 13, 2020 @ 01:25
    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

  • molu 6 posts 77 karma points c-trib
    Apr 20, 2021 @ 11:56
    molu
    0

    Hi David

    Did you find a solution for this?

    Apparently it is still an issue in version 8.12.2

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Apr 20, 2021 @ 19:29
    Huw Reddick
    0

    Very odd, we are not having any issues using named crops at all

  • Gurumurthy 54 posts 127 karma points
    Sep 21, 2021 @ 07:31
    Gurumurthy
    0

    HI Team,

    I am having an issue with crops, in v8.14.1.

    The crops works fine on regular images, but not with 8k images which have dimensions around 5760 × 3840 px.

    If we reduce the quality of image then crops works.

    Is their any way to make crops on an 5k 0r 6k with original image?

    Tried with all way of setting the crop from Umbraco, not working.

    Media is fetched from Azure blob storage.

    Thanks,
    Gurumurthy J V

Please Sign in or register to post replies

Write your reply to:

Draft