Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

GIFs converted to PNGs, losing animation #73

Closed
justinph opened this issue Jul 11, 2013 · 2 comments
Closed

GIFs converted to PNGs, losing animation #73

justinph opened this issue Jul 11, 2013 · 2 comments

Comments

@justinph
Copy link

I'm wondering why gif files are converted to png files:
https://github.com/humanmade/WPThumb/blob/master/wpthumb.php#L395

For gifs that have animation, this ends up stripping the animation, which is problematic when a user is expecting their animation to remain.

Is there some design decision behind this? Perhaps an arg could be added that would fix this (I'd be happy to create a version & pull request).

@joehoyle
Copy link
Member

Hey,

Right, so GIFs are converted to PNG, because GIFs resized by GD lose the animations (and I probably never looked into it enough to get that working), so we chose to convert to PNG as GIF is a inferior format to PNG if not animated.

If you want to pull-request downsizing of GIFs that would be great!

@justinph
Copy link
Author

Hmm. After looking at this more in depth, it would be necessary to re-implement the wp GD and imagemagick classes to deal with animation. It's possible, but I really don't like overwriting wp core like that.

I've fixed my own issue by just not resizing gifs on the server in circumstances. I'll keep this issue in mind going forward and see if WP core needs the patch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants