-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Docs: Image Optimization Deep Dive #78857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Conversation
Hi there 👋 It looks like this PR introduces broken links to the docs, please take a moment to fix them before merging:
Thank you 🙏 |
|
||
### Duration | ||
|
||
TODO: What is the default duration with no configuration? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the default cache duration if not configured?
- [Caches](#caching-and-revalidating-images) the optimized image. | ||
- Serves the optimized images at runtime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the images cached and served from?
On vercel vs. self-hosting
### Supported image formats | ||
|
||
The built-in loader supports common web-friendly formats: | ||
|
||
- `jpeg` | ||
- `png` | ||
- `webp` | ||
- `avif` | ||
- `tiff` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm supported vs. unsupported image formats
- Generates multiple [image sizes](#image-sizing) for different screens using modern [image formats](#supported-image-formats). | ||
- Builds the URLs pointing to the optimized image version, and creates a `srcset` attribute. | ||
- [Caches](#caching-and-revalidating-images) the optimized image. | ||
- Serves the optimized images at runtime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, these steps should be sequential
Deep dive on how image optimization works in Next.js
Closes: https://linear.app/vercel/issue/DOC-4634/new-page-how-image-optimization-works-in-nextjs