-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gatsby-plugin-image): Add
outputPixelDensities
to `SHARP_ATTRIB…
…UTES` (#36203) Co-authored-by: Ward Peeters <[email protected]> Co-authored-by: LekoArts <[email protected]>
- Loading branch information
1 parent
d5113c1
commit ae226b5
Showing
5 changed files
with
42 additions
and
0 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
24 changes: 24 additions & 0 deletions
24
e2e-tests/visual-regression/src/pages/static-images/sharp-props.js
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,24 @@ | ||
import * as React from "react" | ||
import { StaticImage } from "gatsby-plugin-image" | ||
import { TestWrapper } from "../../components/test-wrapper" | ||
import Layout from "../../components/layout" | ||
|
||
const Page = () => { | ||
return ( | ||
<Layout> | ||
<h1>Defining sharp props</h1> | ||
<TestWrapper> | ||
<StaticImage | ||
src="../../images/cornwall.jpg" | ||
loading="eager" | ||
width={300} | ||
alt="cornwall" | ||
layout="fixed" | ||
outputPixelDensities={[1, 2, 3]} | ||
/> | ||
</TestWrapper> | ||
</Layout> | ||
) | ||
} | ||
|
||
export default Page |
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