-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog post images should lazy load #568
base: master
Are you sure you want to change the base?
Blog post images should lazy load #568
Conversation
const parsed = JSON.parse(imgdata); | ||
return ( | ||
<GatsbyImage | ||
className={className} | ||
style={{ margin: '0 auto' }} | ||
image={parsed} | ||
alt={alt || 'Blog Post Image'} | ||
loading="eager" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value is lazy.
const parsed = JSON.parse(imgdata); | ||
return ( | ||
<GatsbyImage | ||
className={className} | ||
style={{ margin: '0 auto' }} | ||
image={parsed} | ||
alt={alt || 'Blog Post Image'} | ||
loading="eager" | ||
placeholder="none" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prop placeholder
does not exist in StaticImage
component.
Visit the preview URL for this PR (updated for commit 4371fcb): https://estuary-marketing--pr568-brenosalv-tech-debt-72zpn15z.web.app (expires Sun, 15 Dec 2024 19:05:21 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 76f6b095a0752e5d9c6c890267f9fdc3e392161e |
Forgot that I tried this once and ran into the same issue. I did not look into it at all though - so the fix is possibly simple. |
To be honest, I’m not sure how to fix this yet. The lazy loading just works when we refresh the page. |
Changes
@draftbox-co+gatsby-rehype-inline-images+1.0.2.patch
.Tests / Screenshots
Prod env:
Dev env: