mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
We were resizing animated images when importing them, but we don't optimize images when they come from an upstream provider. For consistency, we can skip resizing for local animated images as well. Fixes #39317 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
import Image from 'next/image'
|
|
|
|
import img1 from '../public/animated2.png'
|
|
import img2 from '../public/äöüščří.png'
|
|
import img3 from '../public/test.avif'
|
|
import img4 from '../public/test.jpg'
|
|
import img5 from '../public/test.webp'
|
|
import img6 from '../public/animated.gif'
|
|
import img7 from '../public/grayscale.png'
|
|
import img8 from '../public/test.bmp'
|
|
import img9 from '../public/test.png'
|
|
import img11 from '../public/animated.png'
|
|
import img12 from '../public/mountains.jpg'
|
|
import img13 from '../public/test.gif'
|
|
import img14 from '../public/test.svg'
|
|
import img15 from '../public/animated.webp'
|
|
import img17 from '../public/test.ico'
|
|
|
|
export default function Home() {
|
|
return (
|
|
<>
|
|
<h1>Image Optimizer Home</h1>
|
|
<Image src={img1} />
|
|
<Image src={img2} />
|
|
<Image src={img3} />
|
|
<Image src={img4} />
|
|
<Image src={img5} />
|
|
<Image src={img6} />
|
|
<Image src={img7} />
|
|
<Image src={img8} />
|
|
<Image src={img9} />
|
|
<Image src={img11} />
|
|
<Image src={img12} />
|
|
<Image src={img13} />
|
|
<Image src={img14} />
|
|
<Image src={img15} />
|
|
<Image src={img17} />
|
|
</>
|
|
)
|
|
}
|