I am using images from a graphCms model as background images and they are displayed with no problem. When I build the project, the images are not displayed.
Relevant information
When I manually input the background-image:url() in the generated html code then the background image is shown. All other images from graphCms are being shown with no issues even after gatsby build.
below is generated html after i ran gatsby develop
below is generated html after i ran gatsby build
but when I manually input the generated code from the previous image into the generated build, the image is displayed.
this is sample on how I reference the image<BackgroundImage Tag="section" {...convertToBgImage(getImage(slide.image))} style={{ backgroundSize: 'cover', backgroundRepeat: 'no-repeat', }}>
this is my graphQlallGraphCmsSlider { nodes { image { gatsbyImageData } } }
Summary
I am using images from a graphCms model as background images and they are displayed with no problem. When I build the project, the images are not displayed.
Relevant information
When I manually input the
background-image:url()
in the generated html code then the background image is shown. All other images from graphCms are being shown with no issues even after gatsby build.below is generated html after i ran
gatsby develop
below is generated html after i ran
gatsby build
but when I manually input the generated code from the previous image into the generated build, the image is displayed.
this is sample on how I reference the image
<BackgroundImage Tag="section" {...convertToBgImage(getImage(slide.image))} style={{ backgroundSize: 'cover', backgroundRepeat: 'no-repeat', }}>
this is my graphQl
allGraphCmsSlider { nodes { image { gatsbyImageData } } }
Kindly assist where I have it wrong.