You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a strange behaviour when using GIF files with default media config. I have:
Grav@1.1.17
default media config: GIF's type is 'animated'
a page (foo.lang.md) with a headers' key containing a GIF filename (bar.gif)
an alternative for this file (i.e. bar.gif & bar@2x.gif in the page folder) (I guess this is important to reproduce bug)
a twig template calling page.media to retrieve GIF's URL
I get:
Twig_Error_Runtime
An exception has been thrown during the rendering of a template ("Division by zero").
On the line calling page.media.
The line throwing 'Division by 0' is actually system/src/Grav/Common/Page/Media.php:144
The object used here does not have width and height because MediumFactory gives me a StaticImageMedium (system/src/Grav/Common/Page/Medium/MediumFactory.php:87). Everything is fine with 'image'.
Doc is cool but should dig deeper for this kind of stuff.
Hope this helps!
The text was updated successfully, but these errors were encountered:
I'm pretty sure we are relegating all gifs to be animated as we can't tell animated from non animated. And then you are trying to do retina which is not support for animated types. Does it work if you remove the @2x version?
Hello,
I found a strange behaviour when using GIF files with default media config.
I have:
I get:
On the line calling page.media.
The line throwing 'Division by 0' is actually system/src/Grav/Common/Page/Media.php:144
The object used here does not have width and height because MediumFactory gives me a StaticImageMedium (system/src/Grav/Common/Page/Medium/MediumFactory.php:87). Everything is fine with 'image'.
Doc is cool but should dig deeper for this kind of stuff.
Hope this helps!
The text was updated successfully, but these errors were encountered: