Deployed with gh-pages and now img tags aren't pulling images #130787
Replies: 4 comments
-
Hi @ethanbossen , I took a look at your repo and noticed that it's a React project, I think you need to have an |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
I'd gladly assist you with the image issue you're encountering after deploying your project with GitHub Pages. Here are the common causes and solutions to troubleshoot the problem:
Double-check file paths: Ensure the src attribute in your image tags points to the correct location of your images relative to your HTML file. Common mistakes include:
Match filenames: Make sure the filenames in your HTML and the actual image files match exactly (including case sensitivity). GitHub Pages is case-sensitive. Verify image presence: Double-check that your images have been successfully uploaded to your GitHub repository. GitHub Pages will only serve files within the docs folder. Hard reload: Sometimes, a cached version of your webpage might be causing the issue. Try a hard reload (Ctrl+Shift+R or Cmd+Shift+R) to force the browser to download the latest files from GitHub Pages. Review build configuration: If you're using a build process (like Webpack or Gulp), ensure it's configured correctly to handle image assets and not modify paths in a way that breaks them on GitHub Pages. Test locally: Before deploying, test your project locally using a server like an HTTP server or a development server provided by your framework to ensure image paths work correctly. Share a snippet of your code, particularly the image tags and directory structure. |
Beta Was this translation helpful? Give feedback.
-
Figured it out, it was a pathing issue |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Not sure why the images aren't rendering in my project. Everything worked fine until I deployed to pages, now the images wont appear locally or on my gh-page set up. https://github.com/ethanbossen/Lemon-Reservations https://ethanbossen.github.io/Lemon-Reservations/ any help with this would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions