rsnext/examples/image-component
Vadorequest 6f42096233
Add link to live demo already hosted (#25718)
* Add link to live demo already hosted

To make it easier for people to simply see the live example without having to deploy a whole new project

* update link


Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-25 11:52:54 -05:00
..
components Fix ViewSource component in the docs (#19022) 2020-11-10 17:02:39 +00:00
pages Update next/image docs and example with shimmer animation (#26183) 2021-06-16 14:54:25 +00:00
public Update example for Image Component (#18762) 2020-11-03 15:40:53 -05:00
.gitignore Add docs for Image Optimization (#18107) 2020-10-24 14:53:28 +02:00
app.css Update Image docs with links to examples (#18770) 2020-11-04 17:24:14 +00:00
next.config.js Add docs for Image Optimization (#18107) 2020-10-24 14:53:28 +02:00
package.json Update examples to use React 17 (#26133) 2021-06-16 16:43:26 +00:00
README.md Add link to live demo already hosted (#25718) 2021-06-25 11:52:54 -05:00
styles.module.css Add props objectFit and objectPosition to Image component (#18849) 2020-11-05 19:42:55 +00:00

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!

Live demo

https://image-component.nextjs.gallery/

Preview

Preview the example live on StackBlitz:

Open in StackBlitz

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).