Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support static images #150

Open
petrgazarov opened this issue Mar 11, 2021 · 5 comments
Open

Support static images #150

petrgazarov opened this issue Mar 11, 2021 · 5 comments
Labels
enhancement New feature or request not stale This issue has gone quiet but will be kept open

Comments

@petrgazarov
Copy link

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.

@timhagn
Copy link
Owner

timhagn commented Mar 13, 2021

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.

@timhagn timhagn added the enhancement New feature or request label Mar 13, 2021
@ChrisCrossCrash
Copy link

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.

@timhagn
Copy link
Owner

timhagn commented Mar 22, 2021

Here ya go: babel-plugin-parse-static-images, its meanwhile merged in : ).

@github-actions
Copy link

github-actions bot commented Apr 8, 2021

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 : )!

@github-actions github-actions bot added the stale? This issue has gone awfully quiet... label Apr 8, 2021
@timhagn timhagn added not stale This issue has gone quiet but will be kept open and removed stale? This issue has gone awfully quiet... labels Apr 8, 2021
@exil0867
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request not stale This issue has gone quiet but will be kept open
Projects
None yet
Development

No branches or pull requests

4 participants