add: LQIP, optional fallback, sizes prop - #3
Open
lxsmnsyc wants to merge 1 commit into
Open
Conversation
lxsmnsyc
added this pull request to stack #4
September 9, 2026 16:37
commit: |
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
Adds an inline placeholder for local images, a
sizesprop, and a cache forprocessed images. The
fallbackprop becomes optional.Changes
data URL plus the dominant color of the image, and the component paints it on
the aspect ratio box until the image loads. The preview is dropped once the
image is revealed, so a transparent image does not show it through.
placeholder: falseto skip it, orplaceholder: { size }to change its width.{ url, color }shape fromtransformURL.SolidImagetakes asizesprop, forwarded to every<source>. Without itthe browser assumes the image spans the full viewport width and downloads a
larger variant than it needs.
fallbackprop is optional. Leave it out and the image is revealed assoon as it loads.
and modification time of the source file, the format, the width and the
quality. A file that already exists is reused instead of encoded again.
stale file is never served. Before this the name came from the source path
alone.