You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(gatsby-image): Add support for native lazy loading (#13217)
* Add support for new native lazy loading to gatsby-image
* Add loading prop to typings
* Fix feature check
* Fix optional prop
* Update snapshots
* Deprecate critical and map its value to loading
* Document new loading attribute
* Update comment
* Apply suggestions from code review
Co-Authored-By: Dustin Schau <DSchau@users.noreply.github.com>
* chore: format
* Do not show deprecation message in production
* Clean up markdown table
* Clean up markdown table again
* Fix test
Copy file name to clipboardExpand all lines: packages/gatsby-image/src/__tests__/__snapshots__/index.js.snap
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ exports[`<Image /> should have a transition-delay of 1sec 1`] = `
35
35
/>
36
36
</picture>
37
37
<noscript>
38
-
<picture><source type='image/webp' srcset="some srcSetWebp" /><img width="100" height="100" srcset="some srcSet" src="test_image.jpg" alt="Alt text for the image" title="Title for the image" style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>
38
+
<picture><source type='image/webp' srcset="some srcSetWebp" /><img loading="lazy" width="100" height="100" srcset="some srcSet" src="test_image.jpg" alt="Alt text for the image" title="Title for the image" style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>
<picture><source type='image/webp' srcset="some srcSetWebp" /><img width="100" height="100" srcset="some srcSet" src="test_image.jpg" alt="Alt text for the image" title="Title for the image" style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>
79
+
<picture><source type='image/webp' srcset="some srcSetWebp" /><img loading="lazy" width="100" height="100" srcset="some srcSet" src="test_image.jpg" alt="Alt text for the image" title="Title for the image" style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>
0 commit comments