October 22, 2024
Chicago 12, Melborne City, USA
HTML

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

  • media

    • calculations.png
  • index.html

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?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video