mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This adds support for `images.localPatterns` config to allow specific local images to be optimized and (more importantly) block anything that doesn't match a pattern.
27 lines
447 B
JavaScript
27 lines
447 B
JavaScript
import Image from 'next/image'
|
|
|
|
import staticImg from './images/static-img.png'
|
|
|
|
const Page = () => {
|
|
return (
|
|
<main>
|
|
<Image
|
|
id="nested-assets"
|
|
src="/assets/test.png"
|
|
width="200"
|
|
height="200"
|
|
alt="should work"
|
|
/>
|
|
<Image
|
|
id="static-img"
|
|
src={staticImg}
|
|
width="200"
|
|
height="200"
|
|
alt="should work"
|
|
/>
|
|
</main>
|
|
)
|
|
}
|
|
|
|
export default Page
|