我正在使用NextJS13构建一个Web应用程序,突然我看到我的图像质量下降,我不知道为什么或者我错过了什么或者做错了什么
但是当我在浏览器上检查html元素时,我看到了这个
<img alt="product" loading="lazy" decoding="async" data-nimg="fill" sizes="50px" srcset="/_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=16&q=75 16w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=32&q=75 32w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=48&q=75 48w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=64&q=75 64w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=96&q=75 96w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=128&q=75 128w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=256&q=75 256w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=384&q=75 384w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=640&q=75 640w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=750&q=75 750w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=828&q=75 828w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=1080&q=75 1080w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=1200&q=75 1200w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=1920&q=75 1920w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=2048&q=75 2048w, /_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=3840&q=75 3840w" src="/_next/image?url=https%3A%2F%2Fsunset.com.py%2Fimg%2Fpattern%2Fgoodride%2F716%2Fgoodride_cr976a_01_l.jpg&w=3840&q=75" style="position: absolute; height: 100%; width: 100%; inset: 0px; color: transparent;">
当我改变大小=“50px”到250px inssde teh浏览器它的工作,但我不知道为什么和下一步做这atomaticly或我做了什么,这发生或什么我必须配置为避免这一点,我怎么能解决它,为什么这是。
我的图片代码:
<Image
width={500}
height={500}
quality={100}
src={image}
alt={name}
className="absolute object-cover object-center"
/>
1条答案
按热度按时间rqenqsqc1#
我已经解决了使用属性“大小”