strapi / strapi-starter-next-corporate

Next.js starter for creating a corporate site with Strapi.
https://strapi-starter-next-corporate.vercel.app
MIT License
346 stars 95 forks source link

Where is the next.js image optimization? #59

Open cmsbased opened 3 years ago

cmsbased commented 3 years ago

What is the purpose of using next/image with "srcset" when nothing is optimized? img duplicates same digitalocean image URL 8 times. https://starter-uploads.nyc3.digitaloceanspaces.com/user_ed78b0e88f.png

Same 1.2Mb image loads on retina macbook and iphone 4 over 3g.

cmsbased commented 3 years ago

I removed loader with hardcoded URL to make use of responsive images. https://github.com/strapi/strapi-starter-next-corporate/blob/10002a289f91e5f87e6eb745ec69be1dcbea0d44/starter/components/elements/image.js#L23

Next.JS figured out the rest and loaded optimized srcset images.