storyblok-toolkit
storyblok-toolkit copied to clipboard
[Image] Provide a hook that returns props to pass onto a next/image component
I know this library is not specific to Next.js but since it does have some Next.js-specific features I think it would be nice to have a component and/or hook to use the native next/image component.
Even though the already included Image component in this library works great and it's not Next-specific, there are some features missing from the next/image component (I couldn't get the Image component to behave like the next/image with layout=fill)
What about adding a useNextStoryblokImage
that returns the props to pass to a next/image component? Something similar to what they've done in next-sanity-image.
Sounds like a useful feature, I'll look into it!
For layout=fill, maybe you can target .storyblok-image-wrapper
with some css, and try to play around with the fit
prop to get something similar.