Image cropper sometimes doesn´t crop (but just adds some padding to make the image suite the dimensions)
Hi,
I have a site (was 8.10.x, but have just upgraded to 8.18.4 because I hoped to solve my problem that way). The problem is that image cropper sometimes doesn´t crop the images, but just adds some padding to make the image suite the dimensions.
The site is https://uge30.glrye.dk and you can see on the two attached images how padding is added instead of cropping the image.
Touching the web.config file or deleting the /App_Data/cache/ folder doesn´t solve the problem.
Images are not always up-scaled if they are smaller than the size that you're looking for. You should check out the option imageCropMode in .GetCropUrl( ... ). Some options support up-scaling, others don't. Some of them add padding. So you should check if your images are smaller than the provided width and height and check which crop mode you are using. Try some different settings, see which works how you expect.
upScale: true seemed right, but didn´t do any change.
The 'funny' thing is that the image is smaller than the size I request from GetCropUrl() (and that could explain why) but it works on the initial upload and the error (padding) comes after I go cropping the image in the backend.
Image cropper sometimes doesn´t crop (but just adds some padding to make the image suite the dimensions)
Hi,
I have a site (was 8.10.x, but have just upgraded to 8.18.4 because I hoped to solve my problem that way). The problem is that image cropper sometimes doesn´t crop the images, but just adds some padding to make the image suite the dimensions.
The site is https://uge30.glrye.dk and you can see on the two attached images how padding is added instead of cropping the image.
Touching the web.config file or deleting the /App_Data/cache/ folder doesn´t solve the problem.
Hi Martin,
Images are not always up-scaled if they are smaller than the size that you're looking for. You should check out the option
imageCropMode
in.GetCropUrl( ... )
. Some options support up-scaling, others don't. Some of them add padding. So you should check if your images are smaller than the provided width and height and check which crop mode you are using. Try some different settings, see which works how you expect.Thanks for the suggestion. I gave tried several different options (found in https://github.com/umbraco/Umbraco-CMS/blob/95cd32ad8ce27993d9550a86950d821a1b4683ad/src/Umbraco.Web/ImageCropperTemplateExtensions.cs):
upScale: true
seemed right, but didn´t do any change.The 'funny' thing is that the image is smaller than the size I request from GetCropUrl() (and that could explain why) but it works on the initial upload and the error (padding) comes after I go cropping the image in the backend.
is working on a reply...