Can't configure Nextjs Image eager loading after upgrading from v6 to v8.3.5 #29293
Unanswered
killthekitten
asked this question in
Help
Replies: 1 comment 3 replies
-
I'm also having the same issue. Passing the @killthekitten Did you get anywhere with fixing this at all? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
We are using storybook with nextjs, and we recently upgraded two major versions up to v8.3.5. Before the upgrade we used to patch the Next/Image component with the following code in
.storybook/preview.js
:After the upgrade, we introduced the recommended configuration in
.storybook/main.ts
:Now all the image components render with
loading="lazy"
regardless of what we pass toframework.options.image
. How can this be fixed?Additional information
Current
main.ts
:The preview was cleaned up a bit as well:
Create a reproduction
When you load this story and right-click on the image, it would show
loading="lazy"
instead ofloading="eager
:https://stackblitz.com/edit/github-1ixds7?file=pages%2Findex.tsx
Beta Was this translation helpful? Give feedback.
All reactions