next image issue
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
hi
I am using images from the public folder but when I build and see the src and the browser downloads it does not compress them and leaves them in .jpeg or .png form and in theory I should optimize them what am I doing wrong?
that's how I use them
import Image from 'next/image'
<Image src={'/home/en/challengesallianz.jpg} fill alt="" className="h-[50%] w-full" />
and when I see the browser already compiled it appears the same
<img alt="" loading="lazy" decoding="async" data-nimg="fill" class="h-\[50%\] w-full" style="position:absolute;height:100%;width: 100%;left:0;top:0;right:0;bottom:0;color:transparent" src="/home/en/challengesallianz.jpg">
It is the same size as the image in the public folder.
with the same size as the folder and in theory it should convert it to webp
I am using images from the public folder but when I build and see the src and the browser downloads it does not compress them and leaves them in .jpeg or .png form and in theory I should optimize them what am I doing wrong?
that's how I use them
import Image from 'next/image'
<Image src={'/home/en/challengesallianz.jpg} fill alt="" className="h-[50%] w-full" />
and when I see the browser already compiled it appears the same
<img alt="" loading="lazy" decoding="async" data-nimg="fill" class="h-\[50%\] w-full" style="position:absolute;height:100%;width: 100%;left:0;top:0;right:0;bottom:0;color:transparent" src="/home/en/challengesallianz.jpg">
It is the same size as the image in the public folder.
with the same size as the folder and in theory it should convert it to webp