Skip to content

Conversation

hasparus
Copy link
Contributor

@hasparus hasparus commented Sep 29, 2025

Description

This PR:

  • removes the nextImageExportOptimizer directory with the rescaled images,
  • goes back to using next/image instead of next-image-export-optimizer,
  • switches off output: export
  • I considered using lqip-modern, but plaiceholder 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?

  • Use placeholder=blur with blurDataURL whenever you want something very smooth.
  • You don't have to pass blurDataURL explicitly if the src is StaticImageData from file import.
  • Use plaiceholder with getStaticProps in pages and server components in app to get LQIPs for remote images.
  • Use 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 of next/image with output: export. However, SSG in Next.js is no longer locked under output: export.

Copy link

vercel bot commented Sep 29, 2025

@hasparus is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@hasparus hasparus marked this pull request as ready for review September 30, 2025 18:07
Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
graphql-github-io Ready Ready Preview Comment Sep 30, 2025 6:37pm

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.

1 participant