silverwolf-x's picture
|
download
raw
1.48 kB

Image Component Example

This example shows how to use the Image Component in Next.js serve optimized, responsive images.

The root page (app/page.tsx) has a couple images, one internal image and one external image. In next.config.js, the domains property is used to enable external images. The other pages demonstrate the different layouts. Run or deploy the app to see how it works!

Live demo

https://image-component.nextjs.gallery

Deploy your own

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example image-component image-app
yarn create next-app --example image-component image-app
pnpm create next-app --example image-component image-app

Deploy it to the cloud with Vercel (Documentation).

Xet Storage Details

Size:
1.48 kB
·
Xet hash:
0d8d0d574f1aed7a4e9779efac9200ea836bc637d70fdfd69f56ac77ad7eeb92

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.