Skip to content

Keep animation properties when saving JPEG XL - #4632

Merged
lovell merged 1 commit into
lovell:mainfrom
janaz:jxl-animated-output
Oct 12, 2026
Merged

lovell merged 1 commit into
lovell:mainfrom
janaz:jxl-animated-output

Conversation

@janaz

@janaz janaz commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR enables generating animated JPEG XL images. The current sharp version depends on libvips which has support for animated JPEG XL (since v8.15), but the delay and loop properties are still being dropped when writing JXL output. This PR stops dropping them.

Allows animated JXL output (loop/delay) now that libvips supports it
(8.15+ with libjxl).
Comment thread test/fixtures/index.js
inputGifGreyPlusAlpha: getPath('grey-plus-alpha.gif'), // http://i.imgur.com/gZ5jlmE.gif
inputGifAnimated: getPath('rotating-squares.gif'), // CC0 https://loading.io/spinner/blocks/-rotating-squares-preloader-gif
inputGifAnimatedLoop3: getPath('animated-loop-3.gif'), // CC-BY-SA-4.0 Petrus3743 https://commons.wikimedia.org/wiki/File:01-Goldener_Schnitt_Formel-Animation.gif
inputJxlAnimated: getPath('rotating-squares.jxl'), // CC0 https://loading.io/spinner/blocks/-rotating-squares-preloader-gif

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I converted rotating-squares.gif using sharp with this change

@lovell
lovell merged commit 6dff013 into lovell:main Oct 12, 2026
33 checks passed
@lovell

lovell commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Thank you Tomasz

@lovell lovell added this to the v0.35.6 milestone Oct 12, 2026
lovell added a commit that referenced this pull request Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants