htmlimagegithubgithub-pages

Images not displaying/deploying in Github Pages?


I just added a new section to my website on Github pages. But one specific image just isn't displaying on the site. It displays locally but not through Github pages.

Img code:

<img src="./media/calculations.png" style="width: 40%;" class="center">

folder structure (media is a folder):

This is the exact same code for all my images, and this is the only one acting weird. I've copied the name exactly including case of the file type. The image is in the main repo and I can open it by navigating to it and clicking it. I've looked at other similar questions, and I don't think I have the same problem. I eventually went to the website and did inspect element, went to source and opened up the media folder, and for whatever reason this one specific image isn't there. So it seems it hasn't deployed?? I tried redeploying, and also deleting then re-adding the image but nothing.

Any solutions?


Solution

  • Sometimes the server is screwed up and could be the reason also try changing the name of the image file if possible and redo the deployment

    You can also try moving the image outside and checking if file access is the issue. Although this issue is peculiar, this is most probably a bug which is unusual.