Uploaded animated GIF's aren't animating


(Michael Downey) #1

Continuing the discussion from Subcategory security problems:

Steps to reproduce:

  1. Create a reply and on a line by itself provide a URL to an animated GIF, e.g., http :// i.giphy.com / jzQXsabuFUUX6.gif (spaces added to prevent rewriting)
  2. Wait for the system to download the image locally.

Expected behavior:

  • The image is animated both before and after the system downloads it locally.

Actual behavior:

  • The downloaded image does not appear animated when shown inline with the reply, but when the user clicks the image to be full size, it does.

Adding the above URL below to demonstrate (please check back after the image is downloaded locally):


(Kris) #2

This is happening because the gif being uploaded is wider than the column size (690px); So the system is creating a thumbnail and displaying that inline.

I agree that this is confusing, I wasn’t what sure what was happening when I first encountered this as well.


(Michael Downey) #3

Interesting. Is it possible to create an animated thumbnail of the larger animated GIF?


(Régis Hanol) #4

Yes it is possible. That’s just disabled for thumbnails.


(Jeff Atwood) #5

We did have a customer complain about this, so how hard is it to add this? Maybe as a switch?


(Régis Hanol) #6

Not hard at all. Will add a new site setting.


(Régis Hanol) #7

There’s now a new site setting: allow animated thumbnails (defaults to false).

https://github.com/discourse/discourse/commit/bf666f8553d3c306b60d8a8334fd3035fd6a33fb


(Régis Hanol) #8