HomeAbout

Static Assets

What is it

NextJS can serve static assets in /public directory in root of the project

Files inside public can be referenced by starting with the base URL /

  • e.g. public/assets/example.jpeg can be referenced as /assets/example.jpeg
import Image from 'next/image' export default function Page() { return ( <Image src="/profile.png" width={500} height={500} alt="Picture of the author" /> ) }
AboutContact