Github Pages Tips if your img doesn’t appear 🖼️

When it comes to publishing a website on GitHub Pages, it’s important to make sure that all the assets, including images, are properly linked.

If your images don’t appear after you’ve published your website, there are a few things you can check to res…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Israa Gargar

When it comes to publishing a website on GitHub Pages, it's important to make sure that all the assets, including images, are properly linked.

If your images don't appear after you've published your website, there are a few things you can check to resolve the issue.

Tips for fixing missing images:

1️⃣Pay attention to the writing of image extensions:

On GitHub Pages, the case sensitivity of file names matters, so make sure you're using the correct capitalization for your image file extensions. For example:
Images.png is different from images.png

2️⃣Check your image src path. If your code includes a forward slash (/) before the image path, remove it.

For example, if your src path is

src="/images/images.png"

change it to

src="images/images.png"

This will often solve the issue of missing images on GitHub Pages

By following these simple tips, you can quickly resolve any issues with missing images on your website when publishing it on GitHub Pages. By paying attention to details like file name capitalization and src paths, you can ensure that your website looks and works exactly as you intended it to.

githun pages tips


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Israa Gargar


Print Share Comment Cite Upload Translate Updates
APA

Israa Gargar | Sciencx (2023-02-03T15:37:30+00:00) Github Pages Tips if your img doesn’t appear 🖼️. Retrieved from https://www.scien.cx/2023/02/03/github-pages-tips-if-your-img-doesnt-appear-%f0%9f%96%bc%ef%b8%8f/

MLA
" » Github Pages Tips if your img doesn’t appear 🖼️." Israa Gargar | Sciencx - Friday February 3, 2023, https://www.scien.cx/2023/02/03/github-pages-tips-if-your-img-doesnt-appear-%f0%9f%96%bc%ef%b8%8f/
HARVARD
Israa Gargar | Sciencx Friday February 3, 2023 » Github Pages Tips if your img doesn’t appear 🖼️., viewed ,<https://www.scien.cx/2023/02/03/github-pages-tips-if-your-img-doesnt-appear-%f0%9f%96%bc%ef%b8%8f/>
VANCOUVER
Israa Gargar | Sciencx - » Github Pages Tips if your img doesn’t appear 🖼️. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/02/03/github-pages-tips-if-your-img-doesnt-appear-%f0%9f%96%bc%ef%b8%8f/
CHICAGO
" » Github Pages Tips if your img doesn’t appear 🖼️." Israa Gargar | Sciencx - Accessed . https://www.scien.cx/2023/02/03/github-pages-tips-if-your-img-doesnt-appear-%f0%9f%96%bc%ef%b8%8f/
IEEE
" » Github Pages Tips if your img doesn’t appear 🖼️." Israa Gargar | Sciencx [Online]. Available: https://www.scien.cx/2023/02/03/github-pages-tips-if-your-img-doesnt-appear-%f0%9f%96%bc%ef%b8%8f/. [Accessed: ]
rf:citation
» Github Pages Tips if your img doesn’t appear 🖼️ | Israa Gargar | Sciencx | https://www.scien.cx/2023/02/03/github-pages-tips-if-your-img-doesnt-appear-%f0%9f%96%bc%ef%b8%8f/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.