Closed nerdess closed 3 years ago
the odd thing: the images are inside the /public/static folder so the assets are there. they just don't get referenced in the CSS generated by the bgImage
component.
so e.g. this asset which should be displayed as background image is available in the /public/static folder:
Hi @nerdess,
do you talk about the initial rendering in the created .html
files? Then it's probably a duplicate to #148 or at least explained there.
Because with g3bitest I couldn't replicate it just now, images on /gpi
(page with new syntax & gbimage-bridge
) are shown as they should be oO...
Best,
Tim.
@timhagn this is so weird, i deleted my node_modules folder and package-lock.json and did a fresh npm install. partly because i wanted to check if the repo works since i wanted to link it here for people to have a look.
but after the fresh install all works like magic....the images show up in the gatsby build as well now.
this was a total glitch in the matrix that cost me a lot of hours of just being lost and puzzled 🤷
Hi @nerdess,
been there, had that ^^. Great you could solve it!
Best,
Tim.
@nerdess , I followed what you did but still getting no image after build.
Summary
Background images not showing in build :(
Relevant information
I recently switched from
gatsby-image
togatsby-plugin-image
. I am including my background images usinggbimage-bridge
, thee code is pretty straightforward:`
`
When running
gatsby develop
all works fine, I get a Background Image. But when I am usinggatsby build
no image gets displayed.Here is the different source code that gets generated:
Gatsby develop, all good
Gatsby build, not so good, the background image is missing
All the other normal images that are not served through
<BgImage>
are fine.Any help would be great!