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.
Description
This PR:
nextImageExportOptimizer
directory with the rescaled images,next/image
instead ofnext-image-export-optimizer
,output: export
lqip-modern
, butplaiceholder
just fits really well here and required very little code to integrate@saihaj I can't believe you and that one comment from Benjie in the WG issue got me to do this, but here it is.
This isn't just a refactor, because the new placeholder do in fact look better.
How to use the placeholders?
placeholder=blur
withblurDataURL
whenever you want something very smooth.blurDataURL
explicitly if thesrc
isStaticImageData
from file import.plaiceholder
withgetStaticProps
inpages
and server components inapp
to get LQIPs for remote images.placeholder={
data:image/${base64Placeholder}`} whenever you want something a bit pixelated. Normally I wouldn't but in some places it looks very appropriate with our design system.Disclaimer: This PR can be reverted if it turns out Vercel's Image Optimization API is prohibitively expensive.
Context
One historic reason for using
next-image-export-optimizer
could have been the incompatibility ofnext/image
withoutput: export
. However, SSG in Next.js is no longer locked underoutput: export
.