question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No `pages` metadata for animated gif

See original GitHub issue

Maybe I’m doing something wrong but whenever I load an animated gif and do operations on it, I always end up with the first frame transformed and that’s it.

In order to determine if this was due to something deep into our code, I looked more closely into the metadata reported by sharp for animated gifs.

From what I understand from the docs, an animated image is supposed to give a pages value that is a number.

If I input an animated monkey found online, I end up with a metadata.pages that’s undefined and sharp only acts on the first frame.

Is this by design? Am I missing something?

Also, I saw outputting animated webp was supported but is outputting apng supported too? Could be nice to have a clear support grid somewhere in the docs where this kind of things would be listed. But I know how difficult and time-consuming writing docs can be 😉

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, May 23, 2019

It looks like libvips 8.8.0 is required for the pages property - see https://github.com/libvips/libvips/commit/2968bee3fa933f08a0f0bd4686eff43ee9176c55

0reactions
tomgallaghercommented, May 25, 2019

@lovell If the Sharp API need to change to accommodate libvips v8.8.0, I can help with the documentation if that’s plausible and time-saving.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GIF Metadata Format Specification
The GIF image metadata format encodes the image descriptor, local color table, and extension information assciated with a single image within a GIF...
Read more >
Developers - No `pages` metadata for animated gif -
The fastest Node.js module for resizing JPEG, PNG, WebP and TIFF images. Uses the libvips library. See More. Top Supporters. This ...
Read more >
Removing metadata for animated GIF creates non-animated GIF
Right. As a workaround i will exclude GIF files from my workstream. A better solution would work with animated GIFs correctly. Top. 7...
Read more >
SEO Best Practices When Using GIFs - Search Engine Journal
What are the pros and cons of dynamic GIF content? Are GIFs good or bad for SEO? Here's everything you need to know...
Read more >
How to Attach Original Metadata to Every Photo, Meme and ...
A woman walks across a record breaking photo mosaic in Birmingham, ... image search engine TinEye yields 28 pages of results for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found