Add build-time image optimization - #39
Open
LJWatson wants to merge 1 commit into
Open
Conversation
Replace raw <img> tags with a responsive @11ty/eleventy-img shortcode (WebP + fallback picture markup, lazy loading, mandatory alt text with an explicit decorative opt-in) across the About page, the post feature-image slot, and 12 inline post images. Several source images were several megabytes each with no responsive sizing, which this fixes at build time with no runtime dependency.
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
<img>tags with a build-time{% image %}Nunjucks shortcode powered by@11ty/eleventy-img, generating responsive<picture>markup (WebP + original-format fallback, srcset/sizes, lazy loading)post.html's optional feature-image slot, and 12 inline images across 7 post files — several source images were 2–3.5MB with no responsive sizing{ decorative: true }opt-in supports genuinely decorative images withalt=""docs/NOTES.mdTest plan
npm run buildsucceeds with no errors<picture>markup verified directly (webp source, fallback img, correct width/height/alt)npx linkinator ./dist --recursere-run — all new/images/optimized/...references return 200, no regressionsnpm auditunchanged (no new vulnerabilities introduced)