Skip to content

Latest commit

 

History

History
 
 

next-image

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

next-pwa - next-image example

[TOC]

This example demonstrates best practices to serve your images through next.js built-in image serving feature.

For best performance, put images in it's own folder other than public. This will prevent duplicate precaching entries in the sw.js service worker script. Then import Image from 'next/image' to use the Image component provided from next.js in your app.

Usage

Open in Gitpod

cd examples/next-image
yarn install
yarn build
yarn start

Recommend .gitignore

**/public/workbox-*.js
**/public/sw.js