• Resolved atiq83

    (@atiq83)


    Please see the story url: https://stories.k6media.group/ixllmwo87bb97f375228/

    GIF image not animated, however, I inspect the GIF image in the browser and I notice that if we remove the sizes attribute of the generated <img tag then animation works.

    So it seems that .gif support is broken due to the extra “sizes” attribute. How can I fix that?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi there,

    Thanks a lot for reaching out!

    This is unfortunately a known issue with GIFs in WordPress core, where WordPress removes both the animation and transparency from the thumbnail versions (the ones providided in srscet/sizes. So this does not only affect stories, but all GIF usage in WordPress in general.

    We are looking into ways to fix this for the Web Stories plugin though, by either removing the thumbnails or, even better, converting animated GIFs to MP4 videos (for better performance!). You can follow the progress on this ticket.

    In the meantime, a possible workaround is to convert the GIF to an MP4 video yourself. There are various online converter tools for that.

    Thread Starter atiq83

    (@atiq83)

    I fix the issue by removing the “sizes” attribute from the GIF images code.
    I use “web_stories_story_head” hook to add my custom JavaScript and remove the “sizes” attribute from all GIF images. All is working well now.

    Plugin Support Luckyna San

    (@luckynasan)

    @atiq83 We appreciate your update and thank you again for your post!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.gif support is broken’ is closed to new replies.