NextJS: Allow disabling next/image lazy loading#21909
Merged
valentinpalkovic merged 5 commits intostorybookjs:nextfrom Apr 25, 2023
Merged
NextJS: Allow disabling next/image lazy loading#21909valentinpalkovic merged 5 commits intostorybookjs:nextfrom
valentinpalkovic merged 5 commits intostorybookjs:nextfrom
Conversation
Contributor
|
@martinnabhan Thank you so much for your contribution. Your PR would introduce a breaking change where people might rely on lazy loading behavior. Instead, this option should be configurable. Let's add it to the |
Contributor
Author
|
I thought that might be the way to go! I'll see if I can turn it into a parameter some time this week. |
6ab3a72 to
e06f67e
Compare
martinnabhan
commented
Apr 13, 2023
martinnabhan
commented
Apr 13, 2023
martinnabhan
commented
Apr 13, 2023
martinnabhan
commented
Apr 13, 2023
martinnabhan
commented
Apr 13, 2023
e06f67e to
fc49e62
Compare
martinnabhan
commented
Apr 13, 2023
martinnabhan
commented
Apr 13, 2023
fc49e62 to
0d64367
Compare
valentinpalkovic
approved these changes
Apr 18, 2023
ca42384 to
614b8ef
Compare
Contributor
Author
|
@valentinpalkovic Thank you for approving! What's the status on this? |
614b8ef to
0a29a0b
Compare
shilman
pushed a commit
that referenced
this pull request
Jul 4, 2023
…oading Allow disabling next/image lazy loading
Merged
27 tasks
5 tasks
8 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
next/imagelazy loads images by default. When using Storybook (and especially Chromatic) we usually want images below the fold to load as well so they show up in snapshots. This pull request setsnext/image'sloadingproperty toeagerwhich disables lazy loading.How to test
next/imageand place an image below the foldChecklist
MIGRATION.MD
Maintainers
make sure to add the
ci:mergedorci:dailyGH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]