I am having a weird issue with a couple of images on my site where they are not resizing. It seems to be 3 images. No errors in log etc just the image refuses to resize. I wanted to check the blob cache however not sure how to find the image in blob cache.
I know from looking at source that the cache folder structure is based on first 6 chars from sha1 hash of image path. I tried this but I get 4 chars of folders then remaining 2 chars never match. I have been generating the sha1 by using http://www.sha1-online.com/ and putting in url like:
Since I don't have an image to check against. I'm going to assume that the images are simply massive and you're running out of contiguous memory. When that happens I just return the original so the website doesn't explode.
You'd need to register an ILogger implementation via ImageProcessorBootstrapper.Instance.SetLogger(). There's one in the Umbraco source already (v7.4+ I think) but it's not registering and I need to
investigate that.
Hope that helps.
Cheers
James
P.S Upgrade your versions, I only support the latest.
The image is about 1.7mb also same image on our dev / staging and azure staging resizes fine. In my original post there is link an image with the resizing parameters being used.
That first link you posted led me to an error page,.
The more recent link is not a resize operation, it's a cropping and resizing one.
The cropping instructions are completely incorrect.
https://www.stormmanagement.com/media/37099/heroimage16a.jpg?crop=0.36222222222222222,%200,%200.13777777777777778,%200&cropmode=percentage&width=1536&height=1152&rnd=131504740850000000
When using a percentage, cropping instruction the values are supposed to be decimals between 0 and 100.
Removing those instructions and using resize works well.
How to get blob cache image
Hello,
I am having a weird issue with a couple of images on my site where they are not resizing. It seems to be 3 images. No errors in log etc just the image refuses to resize. I wanted to check the blob cache however not sure how to find the image in blob cache.
I know from looking at source that the cache folder structure is based on first 6 chars from sha1 hash of image path. I tried this but I get 4 chars of folders then remaining 2 chars never match. I have been generating the sha1 by using http://www.sha1-online.com/ and putting in url like:
https://www.stormmanagement.com/media/37033/heroimage15b.jpg?crop=0.1203125,0,0.3796875,0&cropmode=percentage&width=320&height=240&rnd=131499458850000000
Is this correct? Also if you hit that url you can see that image is not resized.
I am using ImageProcessor 2.5.2 imageprocessor.web 4.8.2 ImageProcessor.Web.Config 2.3.0.0 ImageProcessor.Web.Plugins.AzureBlobCache 1.1.3.0
Regards
Ismail
Hi Ismail,
You need to factor into the equation the last-write-time of the file, the folder depth is configurable also.
I've written helpers that you can use for this anyway.
https://github.com/JimBobSquarePants/ImageProcessor/blob/develop/src/ImageProcessor.Web/Caching/CachedImageHelper.cs#L23
Since I don't have an image to check against. I'm going to assume that the images are simply massive and you're running out of contiguous memory. When that happens I just return the original so the website doesn't explode.
You'd need to register an
ILogger
implementation viaImageProcessorBootstrapper.Instance.SetLogger()
. There's one in the Umbraco source already (v7.4+ I think) but it's not registering and I need to investigate that.Hope that helps.
Cheers
James
P.S Upgrade your versions, I only support the latest.
James,
Cool. I will try the upgrade see if that fixes the issue and maybe turn on some logging.
Regards
Ismail
Upgrading won't make a difference if you are trying to resize massive images.
Is that the case?
James,
The image is about 1.7mb also same image on our dev / staging and azure staging resizes fine. In my original post there is link an image with the resizing parameters being used.
Regards
Ismail
James,
See this image
This is 700k image which refuses to resize.
Regards
Ismial
Hi Ismail,
That first link you posted led me to an error page,.
The more recent link is not a resize operation, it's a cropping and resizing one.
The cropping instructions are completely incorrect. https://www.stormmanagement.com/media/37099/heroimage16a.jpg?crop=0.36222222222222222,%200,%200.13777777777777778,%200&cropmode=percentage&width=1536&height=1152&rnd=131504740850000000
When using a percentage, cropping instruction the values are supposed to be decimals between 0 and 100.
Removing those instructions and using resize works well.
http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/crop/
Cheers
James
James,
Cheers will investigate further.
Regards
Ismail
James,
I tried the following
https://www.stormmanagement.com/media/37099/heroimage16a.jpg?width=765&height=576&rnd=131504740850000000
So took out crop information completly and it still does not resize?
Regards
Ismail
is working on a reply...