gatsby-simplefolio
gatsby-simplefolio copied to clipboard
Images not Working
Hi @cobidev, I want to thank you for building this. I was able to build my portfolio, including images, and it all worked when I used gatsby develop
to preview it. However, when I build it and published it to Github Pages via the gatsby build --prefix-paths && gh-pages -d public -b master
command (from the docs) the only image that appears is the project.jpg
file. I am not familiar with gatsby, so this could be a problem with the images folder, or the png
or jpeg
extensions, or just my build. The repo is here and the site is gideon357.github.io. Any help is much appreciated 😄 !
Thanks, @gideon357
@jacobo-martinez any idea how to fix this?
it's a gatsby issue, see: https://github.com/gatsbyjs/gatsby/issues/20237
it worked for me to run gatsby clean
before gatsby deploy
:+1:
Hi- I am also having an issue with the images not working when I view the preview of my portfolio in tthe browser. @Gideon357 did you figure out what the problem was?
I am trying to add an image to the background of the hero image. There is a section in the hero.scss file that says to just uncomment and add your custom image.. I did this but the custom image doesnt show up in the hero section, even though I added it to the images folder. Do I need to import the image somewhere else?
Sorry, I'm kind of a beginner- any help would be appreciated!! thanks!
@summer-cook have you tried with gatsby clean
before npm run develop
or npm run deploy
?
I have no experience with the image in hero section but tomorrow i can try and tell you if it works for me
@summer-cook it seems is a problem with the url('') and the instructions, well to me is not working with that instructions neither; what i did is to put my image in /static (in root directory, create the folder) and to change the line of background to background: url('/image.png');
(see: https://www.gatsbyjs.com/docs/static-folder/).
Im gonna do a PR later to fix this :smile:
thank you so much for your help @alexmndzdev , that worked perfectly :)