gatsby-background-image
gatsby-background-image copied to clipboard
Support static images
Summary
gatsby-image
has a handy component StaticImage
which allows to use it with static images, rather than coming from GraphQL. It would be great if this package also supported it. I skimmed through docs and issues, but nowhere seems to be any information about it.
Basic example
import BackgroundImage from 'gatsby-background-image';
<BackgroundImage src='../images/main-hero.png' />
Motivation
Support for static images is useful when you have images that aren't served in your GraphQL queries.
Hi @petrgazarov!
Yip, that would be a nice addition, though, as I already looked into it, @wardpeet wrote a whole babel
plugin for that oO.
Gonna see if / when I find the time to replicate that for gbi
% ).
Best,
Tim.
Hi @timhagn :)
Could you please link the plugin that you are referring to? I've quickly skimmed through @wardpeet's repositories to see if I could find it, but I can't.
Here ya go: babel-plugin-parse-static-images, its meanwhile merged in : ).
Hi there! As @timhagn momentarily is the main contributor to this package, this issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs, though we're open to suggestions on how to get more maintainers! Thank you for your contributions : )!
Any update on this?