Jeavon / Slimsy

Effortless Responsive & Lazy Images with LazySizes and Umbraco
MIT License
72 stars 23 forks source link

ProcessImageAsync 559 exceptions #35

Closed giordanop closed 1 year ago

giordanop commented 3 years ago

Hi, several months ago, a website, which we manage, started logging errors like this:

Exception:
ImageProcessor.Common.Exceptions.ImageProcessingException: ProcessImageAsync 559 : The request /media/1357/product-transformator-2017-v1.jpg?center=0.2275,0.5&mode=crop&%E2%80%A6 could not be understood by the server due to malformed syntax.

We checked what was going on and we decided to ignore errors like this. Now I'm investigating again, since these error are happening 1 per hour and I can't find any reason why this happens. The images are correctly rendered in the page and the URL logged with the error, returns correctly the image.

I found out that the issue might be related to the fact that some crawler only saves part of the url of the image, maybe because it's too long, see the screenshot: image

This is exactly the reported URL (ending with the 3 dots). This URL is returned by the Slimsy package data-srcset="@Url.GetSrcSetUrls(image, width, height)"

Actually now, we have these issues on 3 different Umbraco websites with Umbraco 7 and 8, on Cloud and on standard Umbraco

Umbraco 8 is using Slimsy 3, Umbraco 7 Slimsy 2 all of them uses the share the same code on the Grid media view (https://our.umbraco.com/packages/website-utilities/slimsy/ the snippet in the middle of the page)

I'm wondering if you guys have any idea about how to fix this issue. Thanks.