Skip to content

Commit 4cf66c7

Browse files
committed
[UPD] set image placeholder for lazy-loading
1 parent 97b8d79 commit 4cf66c7

File tree

8 files changed

+24
-5
lines changed

8 files changed

+24
-5
lines changed

src/components/bg-image.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ export default function BackgroundImage({style, imgStyle}) {
66
const data = useStaticQuery(graphql`{
77
fileName: file(relativePath: {eq: "bunker.png"}) {
88
childImageSharp {
9-
gatsbyImageData(width: 1000, quality: 80, layout: CONSTRAINED)
9+
gatsbyImageData(
10+
width: 1000,
11+
placeholder: BLURRED
12+
layout: CONSTRAINED
13+
)
1014
}
1115
}
1216
}

src/components/carousel.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export default function Carousel() {
1313
node {
1414
base
1515
childImageSharp {
16-
gatsbyImageData(width: 500, quality: 80, layout: FULL_WIDTH)
16+
gatsbyImageData(
17+
width: 500,
18+
placeholder: BLURRED,
19+
layout: FULL_WIDTH
20+
)
1721
}
1822
id
1923
}

src/components/contact.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default function Contact() {
5252
className="absolute"
5353
style={{zIndex: `-1`, width: `50vw`, left: `0`, bottom: `5vh`}}>
5454
<StaticImage
55+
placeholder="blurred"
5556
src="../assets/images/map.png"
5657
width={1000}
5758
alt="Map outline of Canada"

src/components/header.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default function Header() {
3434
{/* TODO: center logo */}
3535
<Link to="/">
3636
<StaticImage
37+
placeholder="blurred"
3738
src="../assets/images/coderbunker-logo-black.png"
3839
alt="Coderbunker Logo"
3940
width={50}

src/components/hero.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function Hero() {
4646

4747
{/* Hero Image*/}
4848
<div className="flex-1 hidden md:block p-16">
49-
<StaticImage src="../assets/images/coders.png" alt="Coderbunker Coders"/>
49+
<StaticImage placeholder="blurred" src="../assets/images/coders.png" alt="Coderbunker Coders"/>
5050
</div>
5151
</div>
5252

src/components/join.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default function Join() {
2727
<p className="text-lg lg:text-xl md:my-4 md:pb-8 text-center">#SoftwareDevelopment #EmbeddedSystems #Blockchain #DigitalIdentity #PublicKeyInfrastructure #SystemAdministration #Cybersecurity #Encryption #Linux #FPGA #ARM #RISC-V #Ethereum #PGP #PostgreSQL #AWS #Azure #GoogleCloud #etc</p>
2828
<div style={{maxWidth: `70vw`, width: `500px`, margin: `0 auto`, padding: `2rem`}}>
2929
<StaticImage
30+
placeholder="blurred"
3031
src="../assets/images/coders.png"
3132
alt="Coderbunker Coders Coworking"
3233
/>

src/components/logo-garden.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export default function LogoGarden() {
1313
node {
1414
base
1515
childImageSharp {
16-
gatsbyImageData(width: 150, quality: 80, layout: CONSTRAINED)
16+
gatsbyImageData(
17+
width: 150,
18+
placeholder: BLURRED,
19+
layout: CONSTRAINED
20+
)
1721
id
1822
}
1923
}

src/components/stacked-avatar.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ export default function StackedAvatar() {
1010
node {
1111
base
1212
childImageSharp {
13-
gatsbyImageData(width: 75, layout: FIXED)
13+
gatsbyImageData(
14+
width: 75,
15+
placeholder: BLURRED,
16+
layout: FIXED
17+
)
1418
id
1519
}
1620
}

0 commit comments

Comments
 (0)