(Animated) Gif won't show

Hi everyone,
I have a problem with gif files: somehow they are not recognized as Page Media. I tried the following scenario’s

  1. I uploaded an animated gif. I can find the file in the post’s folder, but it won’t show on my page
  2. 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.
  3. 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:

  type: pagemedia
  filesize: 3

All files are not bigger than 3MB.

What else can I check to find the cause for this issue?

Thanks for your advice in advance :slight_smile:

I found another config file: /user/config/plugins/form.yaml. Here I have the following settings:

enabled: true
built_in_css: true
  multiple: false
  limit: 10
  filesize: 5
  destination: self@
  avoid_overwriting: false
  random_name: false
    - 'image/*'

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 }}">
  {% endfor %}
  {% for animated in page.media.animated %}
    <a href="{{ animated.url }}">
      <img src="{{ animated.resize(480, 600).html() }}">
  {% endfor %}

The animated gifs are not found though. What am I doing wrong?

try page.media.files

1 Like

Sorry, forgot to update here that I got the solution. Antony suggested the same on Slack and it worked :slight_smile: Thanks anyway!