[WIP] Next.js Image Component
See original GitHub issueKeeping track of the feedback so far:
- #18195 Lazy loading flickers a
<img>
with empty or not foundsrc
icon - #18123 Images that are rendered in a
flexbox
are not lazy loaded (@timneutkens) - #18123 Lazy loading has to be the default (@timneutkens)
- #18123 Throw error when
width
andheight
are missing andunsized
is not set (@styfle) - #18138 Rename
lazy=true
toloading=lazy
to match web standard (@styfle) - #18147 Prevent upscaling images, API should never return an image width larger than the source image width (@styfle)
- #18107 Add documentation for
next/image
and automatic image optimization (@styfle) - #18149 Correctly encode the
url
parameter (@ijjk) - #18151 Add missing
w
param for old browsers like IE that dont supportsrcset
(@styfle) - #18178 Add support for string
width
andheight
attributes (use parseInt and error) (@styfle) - #18152 Errors from image optimization need to be surfaced, ie better message when absolute url is not in
domains
(@ijjk) - Lazy loading can probably be converted to effect + state (@atcastle @devknoll)
- #18217 Limit maximum number of
images.domains
andimages.sizes
to 50, maximum value of size to 10000 - #18179 Ignore svg for optimization (vector images can be considered already optimized) (@styfle)
- #5321 Only enable Vercel API in
@vercel/next
whenloader=default
(@styfle) - #18211 Only enable Next API when
loader=default
(@styfle) - #18236 Fix
srcset
to ensure the componentswidth
is the largest possible image (@styfle) - #18267 Separate
deviceSizes
andiconsSizes
(@styfle) - #18224 The
quality
attribute should allow number or string likewidth
(@ykzts) - #18298 Fix redirect in
next dev
for/_next/image/
to/_next/image
(@styfle) - E2E tests to compare
next dev
and Vercel deployments - #18424 #18325 Add err.sh links for all errors
- Deploy to nextjs.org (start with
/next/conf
) (@leerob) - Deploy to vercel.com (start with
@geist/image/new
)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:26
- Comments:22 (11 by maintainers)
Top Results From Across the Web
next/image - Next.js
This section describes the most commonly-used properties of the Image component. Find details about more rarely-used properties in the Advanced Props section.
Read more >Next Images in Storybook - Software engineering notebook
The Image component is very much a key selling point for the Next framework. This is a must use for performance and user...
Read more >Svg images returning 502 and not loading with next/image
I recently attempted to deploy a WIP site for a client using Next.js and netlify, I'm using next/image for almost all images on...
Read more >Icon component — Vuetify
Vuetify is a Material Design component framework for Vue.js. ... This includes icons without text next to them used as interactive controls ...
Read more >Worcester Polytechnic Institute (WPI)
A WPI education has never been more relevant than it is today, because the demand for innovative thinkers who can solve problems on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m wondering if there’s plans for a Contentful loader?
Contentful has an Image API similar to Imgix or Cloudinary, wondering it makes sense to use that directly?
This works fine locally for me but urls give me 400 errors in production with
"url" parameter is required
response.Source url with 400 error:
https://mywebsite.com/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2F1xkvhwkgcr51%2F6HODBVSFqUTbEKI7ilXx%2Ff9f16ab3552e973b764c922f06db181a%2Fmy-image.png&w=1200&q=75
Source url locally with no error:
http://localhost:3000/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2F1xkvhwkgcr51%2F6HODBVSFqUTbEKI7ilXx%2Ff9f16ab3552e973b764c922f06db181a%2Fmy-image.png&w=1200&q=75