Conversation
Prevent animated GIF endless loop (Error 502)
In Contao, you need to set the following in order for Imagine to resize all frames: # config/config.yaml
contao:
image:
imagine_options:
flatten: false |
We don't experience that on our sites. Can you post the GIF that caused it, plus your image size settings? |
Which driver are you using? GD, IMagick or GMagick? (You can see that in the Contao tab of the debug toolbar)
Can you provide such a corrupted file? As the resizer uses atomic write operations, this should never happen. Lines 216 to 217 in 06cafbc While I was not able to reproduce any recursions or other failures, I noticed that resizing an animated GIF takes a long time even if only the first frame is used in the resized result. We should check if we can improve perfomance by only loading the first frame for cases with Should we add an image size option or a global option to skip resizing animated GIFs entirely? |
Prevent animated GIF endless loop (Error 502)
Our customer has multiple animated GIF in Backend. Those cause slowed down backend and 502 Errors. What i see in the logs:
Causing:
So i've made a little check to skip animated gifs.