Skip to content

Files

Latest commit

9973b8c · Mar 26, 2021

History

History
This branch is 19240 commits behind vercel/next.js:canary.

image-component

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 10, 2020
Mar 26, 2021
Nov 3, 2020
Oct 24, 2020
Jan 19, 2021
Nov 4, 2020
Oct 24, 2020
Nov 6, 2020
Nov 5, 2020

Image Component Example

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

The index page (pages/index.js) 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!

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

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

npx create-next-app --example image-component image-app
# or
yarn create next-app --example image-component image-app

Deploy it to the cloud with Vercel (Documentation).