DEV Community

Israa Gargar
Israa Gargar

Posted on

1

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 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

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

Top comments (2)

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
esogargar profile image
Israa Gargar โ€ข

I am glad this help you ๐Ÿ˜Š๐Ÿ‘ฉโ€๐Ÿ’ป
Thank you for your post! ๐Ÿ™ It means a lot to me as this is my first time trying to write and share. I send much love and respect your way. ๐Ÿ’–โค๏ธ

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay