Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media: Issues with animated and transparent gifs uploaded to WordPress #4890

Closed
swissspidy opened this issue Oct 13, 2020 · 2 comments
Closed
Labels
Group: Media Group: WordPress Changes related to WordPress or Gutenberg integration P3 Nice to have Type: Bug Something isn't working

Comments

@swissspidy
Copy link
Collaborator

Bug Description

As mentioned at #4599 (comment), there's a long-standing bug in WordPress core that causes thumbnails of animated gifs not to be animated. A second long-standing bug causes the thumbnails to lose their transparency.

Since we use image thumbnails for srcset, it causes animated gifs in stories to only be animated and transparent when the browser decides to use the full version.

Suggested Fix

Users will likely not realize it's a WordPress bug though. For that reason, I suggest not providing the image thumbnails in the REST API for animated gifs. This will make the editor use the original file at all times.

Downside: potentially larger file size served to users.

Alternative: fix WordPress core bug.

Expected Behaviour

Animated gifs uploaded to WordPress should stay animated in stories.

Steps to Reproduce

  1. Upload animated gif to WordPress media library
  2. Insert in story

Screenshots

Original, animated gif used:

Screenshot 2020-10-13 at 13 41 29

Thumbnail used:

Screenshot 2020-10-13 at 13 41 34

Additional Context

  • Plugin Version: 1.0.0
  • Operating System: macOS
  • Browser: Chrome
  • WordPress Version: 5.5

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

Implementation Brief

@swissspidy swissspidy added Type: Bug Something isn't working Group: Media Group: WordPress Changes related to WordPress or Gutenberg integration P3 Nice to have Pod: WP & Infra labels Oct 13, 2020
@spacedmonkey spacedmonkey self-assigned this Oct 23, 2020
@swissspidy
Copy link
Collaborator Author

swissspidy commented Apr 14, 2021

Now that we have FFmpeg in the plugin, we could also just convert animated GIFS to MP4s... That would be superb!

#7232

@swissspidy
Copy link
Collaborator Author

Closing now that #7232 has landed 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: Media Group: WordPress Changes related to WordPress or Gutenberg integration P3 Nice to have Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants