feat(images): add AVIF output to optimize script and OptimizedImage#306
Draft
JonathanMatthey wants to merge 3 commits into
Draft
feat(images): add AVIF output to optimize script and OptimizedImage#306JonathanMatthey wants to merge 3 commits into
JonathanMatthey wants to merge 3 commits into
Conversation
✅ Deploy Preview for interledger-org-v5 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Infi-Knight
reviewed
May 21, 2026
| hasResponsive ? ( | ||
| <picture class={pictureClassName}> | ||
| <source type="image/webp" srcset={srcset} sizes={sizes} media={media} /> | ||
| {avifSrcset && ( |
Contributor
There was a problem hiding this comment.
{avifVariants.length > 0 && (...)} is more explicit and consistent with how hasResponsive is computed two lines above.
Infi-Knight
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
optimize-images.tsnow generates.avifvariants (q75, 4:4:4) alongside.webpfor every width and full-size outputgetOptimizedImagereturnsavifVariants+avifFullSrcOptimizedImagerenders<source type="image/avif">before the WebP source — browsers that support AVIF pick it automaticallyRelated Issue
Fixes WEB-161
Manual Test
Run
pnpm optimize-imagesand confirm.aviffiles appear inpublic/img/optimized/. Check DevTools network tab — AVIF should be served to Chrome/Firefox, WebP to Safari < 16.Checks
pnpm run formatpnpm run lintPR Checklist
feat: ...,fix: ...)