Storybook doesn't recognize what's new in next/image.
See original GitHub issueDescribe the bug The next/image no longer requires width, height, layout=“fill” when accessing the public directory. (next 11) But the storybook doesn’t seem to recognize this.
Image with src "..." must use "width" and "height" properties or "layout='fill'" property.
System Environment Info:
System: OS: macOS 11.4 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Binaries: Node: 14.15.4 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.10 - /usr/local/bin/npm Browsers: Chrome: 91.0.4472.114 Firefox: 87.0 Safari: 14.1.1 npmPackages: @storybook/addon-actions: ^6.4.0-alpha.5 => 6.4.0-alpha.5 @storybook/addon-essentials: ^6.4.0-alpha.5 => 6.4.0-alpha.5 @storybook/addon-links: ^6.4.0-alpha.5 => 6.4.0-alpha.5 @storybook/react: ^6.4.0-alpha.5 => 6.4.0-alpha.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
@soulcactus agreed. this is a nextjs feature, so ideally the nextjs integration for storybook provides this feature somehow. i can imagine a webpack loader/plugin that implements this somehow–not sure how it’s implemented inside nextjs
Nevermind, this addon fixes it: https://storybook.js.org/addons/storybook-addon-next