Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Images not displaying in Github Pages?

I added a project site to my Github project. But some photos are not displaying in the site.

Img code:

<img src="img/screenshot2.PNG" class="img-responsive" alt=""> </div>

folder structure (img is a folder):

img
    Screenshot2.png
index.html

I tried with .png and .PNG (some earlier SO answers suggested it) and none of them work

Any solutions?

like image 670
Carlton Avatar asked Jan 04 '17 16:01

Carlton


People also ask

Can you add images to GitHub Pages?

Adding imagesWikis can display PNG, JPEG, and GIF images. On GitHub.com, navigate to the main page of the repository. Under your repository name, click Wiki. Using the wiki sidebar, navigate to the page you want to change, and then click Edit.

Why my GitHub Pages is not working?

Solution: Verify the publishing source and published URL from your repository's settings tab. Double check that you are using the correct URL by visiting your repository's Settings, and scrolling down to the GitHub Pages section. You should see the URL where your site is published.


2 Answers

Nevermind, I solved it.

If anyone has the same problem.

GitHub Pages are case sensitive. Not only for folders, but also for image names.

like image 128
Carlton Avatar answered Oct 08 '22 06:10

Carlton


Write what you see.

It is Screenshot2.png. With a lower-case png and a capital S at the start.

like image 10
Quentin Avatar answered Oct 08 '22 06:10

Quentin