twopluszero / next-images

Import images in Next.js (supports jpg, jpeg, svg, png and gif images)
MIT License
948 stars 67 forks source link

next-images vs next/Image #85

Open gascenciom1998 opened 2 years ago

gascenciom1998 commented 2 years ago

Can someone help me understand the tradeoffs between the two? Is next-images a superset of next/Image in terms of features?

leerob commented 2 years ago

Hey! Heads up that importing local images is now built-into next/image directly.

https://nextjs.org/docs/basic-features/image-optimization#local-images

eldoy commented 2 years ago

Vanilla HTML: <img src="/img/logo.png">, no NextJS needed. Please, for the sake of humanity, stop using React and Next.

liquidautumn commented 2 years ago

Vanilla HTML: <img src="/img/logo.png">, no NextJS needed. Please, for the sake of humanity, stop using React and Next.

Now do ISR and image optimization with plain HTML.

acrabb commented 2 years ago

Looks like next/image still doesn't work when using Expo + Next.js ?

So next-images might still be needed...but then issue https://github.com/twopluszero/next-images/issues/84 happens

zargold commented 1 year ago

The problem is that next-images has better backwards/cross-compatibility with other frameworks/past projects. Eg. for me I have some stuff working on legacy react that uses <img src="/something.jpg" /> and that is cross-compatible with my old stuff and next.js stuff (as long as I use next-images) but not if I switch. So... yeah been getting a lot of issues upgrading from 12.2.x => 12.3.4 seemingly related to when nextConfig.serverRuntimeConfig gets defined in the later versions.

Would love for next-images to be fixed for later versions of next so I don't have to migrate 100% of legacy-react pages to Next.js just to use next/image.