pressbooks-book icon indicating copy to clipboard operation
pressbooks-book copied to clipboard

Animated GIFs don't have a graceful fallback in export formats

Open mcgratay opened this issue 4 years ago • 1 comments

Description

Pressbooks allows a wide array of interactive media content which can only be viewed in the webbook. This includes H5P activities, videos, audio, and more.

When these media elements are included in a book, there's a fallback display that automatically replaces the media content with a URL to the webbook.

Animated GIFs are an accepted media type for the webbook format, but do not trigger a fallback display in export formats. Note that when exported, animated GIFs in EPUBs still animate, and GIFs in MOBI and PDF format freeze.

Ebooks cannot validate, however, with animated GIFs included in the export. The resulting error reads:

ERROR(PKG-021): /srv/www/textopress.com/releases/20191105164557/web/app/uploads/sites/303/pressbooks/exports/GIF-Fallbacks-1573074977.epub/OEBPS/assets/example-Animation.gif(-1,-1): Corrupted image file encountered.

Example book: https://inagiffy.textopress.com

Steps to Reproduce

  1. Upload an animated GIF to a chapter and make sure it's set to Full Size
  2. Save the chapter and export to EPUB format
  3. View error logs

Expected behavior: Any media that disrupts file validation should gracefully fallback in export formats

Actual behavior: Animated GIFs cause file validation errors

mcgratay avatar Nov 06 '19 21:11 mcgratay