Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using ImageCropper to crop an image but for some reason the cropped image url is not returning correct size. The original image size is 5120x2880 px and the crop size is 500x500px. However, if I resize the original image to 1920x1080 px and re-upload then the cropped image size is correct. Wondering if there is any settings that needs to be changed or it has something to do with specific resolution.
Here's the syntax of the rendered image:
<img src="@Url.GetCropUrl(Model.HeroBackgroundImage, "Background")" class="img-fluid" alt="" title="" />
I've included the original image also:
I just took a look at your image. It's not actually a JPEG but a WebP image that happens to have a .jpg extension.
Umbraco and ImageProcessor (which handles resizing etc. in Umbraco) won't work with WebP out of the box but it can be enabled - (see https://www.youtube.com/watch?v=u_ec8gEF9eY).
You'll also want to make sure that your file extensions match the type of file that it actually is as this can cause other problems.
It was the cause, these images are uploaded by content editors so I didn't know it was from a different format. After adding the changes, it's cropping correctly now.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted