# Attachment\_fu with animated gifs?

**URL:** <https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759>\
**Category:** Rails\
**Created:** [June 13, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759 "2007-06-13T21:53:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![supaspoida](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@supaspoida](https://www.ruby-forum.com/u/supaspoida)\
**Post date:** [June 13, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759/1 "2007-06-13T21:53:49Z")

</div>

Is this possible? I want to be able to upload animated gifs and have  
attachment\_fu retain the animation. I’ve got everything set up but when  
I upload .gifs the new files do not animated. Is there something special  
I need to do to enable this or is it just not possible? Thanks.

---

<div class="post-metadata">

**Author:** ![supaspoida](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@supaspoida](https://www.ruby-forum.com/u/supaspoida)\
**Post date:** [June 13, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759/2 "2007-06-13T21:55:15Z")

</div>

Lar Van der jagt wrote:

> Is this possible? I want to be able to upload animated gifs and have  
> attachment\_fu retain the animation. I’ve got everything set up but when  
> I upload .gifs the new files do not animated. Is there something special  
> I need to do to enable this or is it just not possible? Thanks.

What is their file extension after the file is uploaded?

–Scott T.

---

<div class="post-metadata">

**Author:** ![supaspoida](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@supaspoida](https://www.ruby-forum.com/u/supaspoida)\
**Post date:** [June 13, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759/3 "2007-06-13T21:57:26Z")

</div>

On 6/13/07, Scott thorpe [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Lar Van der jagt wrote:
> 
> > Is this possible? I want to be able to upload animated gifs and have  
> > attachment\_fu retain the animation. I’ve got everything set up but when  
> > I upload .gifs the new files do not animated. Is there something special  
> > I need to do to enable this or is it just not possible? Thanks.
> 
> What is their file extension after the file is uploaded?

You’re not resizing them are you? I’ve never worked with animated  
files. Feel free to send in a tested patch if you have to fix  
something.

–  
Rick O.  
[http://lighthouseapp.com](http://lighthouseapp.com)  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)

---

<div class="post-metadata">

**Author:** ![supaspoida](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@supaspoida](https://www.ruby-forum.com/u/supaspoida)\
**Post date:** [June 13, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759/4 "2007-06-13T22:35:32Z")

</div>

On Jun 13, 2007, at 4:00 PM, Lar Van der jagt wrote:

> fit 800x800 and the image is smaller than that, but still looks  
> like it  
> has been resized with some dither options on, because the quality  
> is not  
> as good.
> 
> This is for my portfolio website, and I have done some animated banner  
> ads that I want to include.
> 
> I’m new to Ruby on Rails so a patch might be beyond my skills at this  
> point, but if I figure out a work around I will post it.

Since you mention that your gifs are smaller than the 800x800, use  
the form of the resize option that says “only if they need to be made  
smaller”:

“800x800\>”

See:

[http://www.imagemagick.org/RMagick/doc/image1.html#change\_geometry](http://www.imagemagick.org/RMagick/doc/image1.html#change_geometry)  
[http://www.imagemagick.org/RMagick/doc/imusage.html#geometry](http://www.imagemagick.org/RMagick/doc/imusage.html#geometry)  
[http://www.imagemagick.org/RMagick/doc/struct.html#Geometry](http://www.imagemagick.org/RMagick/doc/struct.html#Geometry)

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![supaspoida](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@supaspoida](https://www.ruby-forum.com/u/supaspoida)\
**Post date:** [June 13, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759/5 "2007-06-13T22:00:58Z")

</div>

Scott thorpe wrote:

> What is their file extension after the file is uploaded?
> 
> –Scott T.

File extension stays .gif. I am using thumbnails, which I do not need to  
animate, but the full size needs to animate. I have it set to resize to  
fit 800x800 and the image is smaller than that, but still looks like it  
has been resized with some dither options on, because the quality is not  
as good.

This is for my portfolio website, and I have done some animated banner  
ads that I want to include.

I’m new to Ruby on Rails so a patch might be beyond my skills at this  
point, but if I figure out a work around I will post it.

---

<div class="post-metadata">

**Author:** ![supaspoida](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@supaspoida](https://www.ruby-forum.com/u/supaspoida)\
**Post date:** [June 13, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759/6 "2007-06-13T22:43:30Z")

</div>

Rob B. wrote:

> Since you mention that your gifs are smaller than the 800x800, use  
> the form of the resize option that says “only if they need to be made  
> smaller”:
> 
> “800x800\>”
> 
> See:
> 
> [http://www.imagemagick.org/RMagick/doc/image1.html#change\_geometry](http://www.imagemagick.org/RMagick/doc/image1.html#change_geometry)  
> [http://www.imagemagick.org/RMagick/doc/imusage.html#geometry](http://www.imagemagick.org/RMagick/doc/imusage.html#geometry)  
> [http://www.imagemagick.org/RMagick/doc/struct.html#Geometry](http://www.imagemagick.org/RMagick/doc/struct.html#Geometry)
> 
> -Rob
> 
> Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
> removed\_email\_address@domain.invalid

I actually am using that form, and it works fine except that it still  
seems to save a new copy anyways, thus losing the rest of the frames.
