next/image decreases (lighthouse) performance #60004
Labels
bug
Issue was opened via the bug report template.
Image (next/image)
Related to Next.js Image Optimization.
Link to the code that reproduces this issue
See below
To Reproduce
I created a couple of code sandboxes with the nextjs starter example. The first is unmodified, the second one replaces the next/image package with an
img
HTML element.I'm attaching the HTML reports that I got
reports.zip
Current vs. Expected behavior
Using the native image tag is apparently more performant. However the docs and the eslint rule @next/next/no-img-element discourage this option.
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Image optimization (next/image, next/legacy/image)
Additional context
I first found these results in my production app, deployed on AWS Amplify. I reproduced the same result if I build the app and serve it locally. The issue is reproducible in the code sandbox as well, running the latest version of Next. It's unclear if this is an issue with Lighthouse or Next.
I tested with .svg and .png images. The
priority
prop doesn't seem to make a measurable difference.The text was updated successfully, but these errors were encountered: