I'm trying to write a storybook for my component with Gatsby's StaticImage
but this ends up in nothing at all rendered and an error disguised as warning in the console:
Please ensure that "gatsby-plugin-image" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78
(anonymous) @ static-image.server.tsx:52
I wonder if there's a way to render component using StaticImage
outside of Gatsby?
Component is trivial:
import React from 'react';
import { StaticImage } from 'gatsby-plugin-image';
export const Card = ({ title }) => {
return (
<div>
<div>{title}</div>
<StaticImage src="../../assets/images/background.png" alt="" width={300} height={100}/>
</div>
);
};
I'm using Gatsby v3 & Storybook v6.3