Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into root-mpa-nav
- Loading branch information
Showing
56 changed files
with
1,161 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
341 changes: 170 additions & 171 deletions
341
docs/api-reference/next/future/image.md → docs/api-reference/next/legacy/image.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
/** @type {import('next').NextConfig} */ | ||
module.exports = { | ||
images: { | ||
domains: ['assets.vercel.com'], | ||
formats: ['image/avif', 'image/webp'], | ||
remotePatterns: [ | ||
{ | ||
protocol: 'https', | ||
hostname: 'assets.vercel.com', | ||
port: '', | ||
pathname: '/image/upload/**', | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import Image from 'next/image' | ||
import ViewSource from '../components/view-source' | ||
import mountains from '../public/mountains.jpg' | ||
|
||
const Fill = () => ( | ||
<div> | ||
<ViewSource pathname="pages/layout-fill.tsx" /> | ||
<h1>Image Component With Layout Fill</h1> | ||
<div style={{ position: 'relative', width: '300px', height: '500px' }}> | ||
<Image | ||
alt="Mountains" | ||
src={mountains} | ||
fill | ||
sizes="100vw" | ||
style={{ | ||
objectFit: 'cover', | ||
}} | ||
/> | ||
</div> | ||
<div style={{ position: 'relative', width: '300px', height: '500px' }}> | ||
<Image | ||
alt="Mountains" | ||
src={mountains} | ||
fill | ||
sizes="100vw" | ||
style={{ | ||
objectFit: 'contain', | ||
}} | ||
/> | ||
</div> | ||
<div style={{ position: 'relative', width: '300px', height: '500px' }}> | ||
<Image | ||
alt="Mountains" | ||
src={mountains} | ||
quality={100} | ||
fill | ||
sizes="100vw" | ||
style={{ | ||
objectFit: 'none', | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
) | ||
|
||
export default Fill |
Oops, something went wrong.