Closed cstilstra closed 3 months ago
I'm seeing a very similar problem.
Asset images::7bnoix3p6r4ghrtgyvyqcipgr4.jpg.avif has 0 width or height. Cannot create responsive variants.
My client uploaded a weird looking image file: 7bnoix3p6r4ghrtgyvyqcipgr4.jpg.avif (note that it has two extensions - I don't know why!)
You can test this file if you want: https://easyupload.io/ogbna2
Simply add it to your entry and then try to generate a responsive image from it.
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
Bug description
I used the responsive image tag to try and display an image that was incorrect. The image had a .jpg extension but had it's mime type listed as png. Laravel's ImageGenerator correctly throws an exception, but that exception isn't handled anywhere in the tag so my entire page ends up crashing. What I would like to see is that information is written to the log and the responsive image tag displays nothing on the screen, rather than letting the exception go unhandled.
How to reproduce
In your OS, rename a .png file to .jpg without running through an actual image conversion function. Add this incorrect image to a Statamic project's assets. Then try to display this image on a Statamic page using the responsive image tag.
Logs
No response
Environment
Installation
Starter Kit using via CLI
Antlers Parser
regex (default)
Additional details
No response