GIF in Etsy Demo

Hi Alex, thanks again for the help. This site is my bible. I'm thinking about including a GIF animation instead of image for etsy demo thumbnail. My approach is to use Rmagick as shown here: https://gist.github.com/grough/1988486. But my question is 1) will this gif file transfer when I push the app to heroku? and 2) should I just change the "thumbnail" class to a "GIF" class? Here is my code: https://www.dropbox.com/home/Screenshots?preview=Screenshot+2015-07-20+21.32.46.png

Posted about 4 years ago by Jeremy Molayem
Posted about 4 years ago by Jeremy Molayem

I actually think "img src ="...." would stay the same but the file would just be a "random.gif" file. I'll keep testing it out.

1
Posted about 4 years ago by Jeremy Molayem

This is kind of a niche issue. Sorry about that.

1
Posted about 4 years ago by Alex Yang

That's alright - when you build your own projects, you're bound to encounter niche issues that you need to figure out. It's all part of the process.

If you're following the Etsydemo course, you'll need to make a few changes to accommodate GIFs instead of images. For example, you'll want to change the line of validation code in your model file to validate that the file is a GIF (not an image). But other than that, I would imagine that the rest of it would be the same.

I'm not sure whether you'll still be able to use Bootstrap's 'thumbnail' class for GIFs, but you should try it out and see. And like images, your GIFs should still display when you deploy to Heroku as long as the files are hosted somewhere else, like Dropbox or Amazon S3.

Hope that helps!

1
Posted about 4 years ago by Jeremy Molayem

It worked! I just treated it as I would a regular image. Thanks!

1