Hi everyone,
I have a problem with gif files: somehow they are not recognized as Page Media. I tried the following scenario’s
I uploaded an animated gif. I can find the file in the post’s folder, but it won’t show on my page
I uploaded a jpeg, to see if there was something wrong with page folder or something. There was no issue, the jpeg showed as it should.
I uploaded a non-animated gif to check if the animated character of the first gif might cause the issue. But it seems not; the non-animated gif also doesn’t show on the page.
I also checked the blueprint, but I don’t see anything weird:
After reading this forumpost, I found out gifs are not an image type. So now I want to loop through both the images and animated media of a page with the following code:
<div class="grid-item">
{% for image in page.media.images %}
<a href="{{ image.url }}">
<img src="{{ image.cropResize(480,600).url }}">
</a>
{% endfor %}
{% for animated in page.media.animated %}
<a href="{{ animated.url }}">
<img src="{{ animated.resize(480, 600).html() }}">
</a>
{% endfor %}
</div>
The animated gifs are not found though. What am I doing wrong?