At a loss on how to get images to work on GP

config

url                      : https://rcyost.github.io 
baseurl                  : ""
repository               : "rcyost.github.io"

code

!["text"](/images/lineGraphRailRoad.png)
!["text"](/images/pressure-1.png)

I have an images folder.
When I push the post to GitHub Pages some images don’t show while others do?
The image names are correct and the paths are the same?

I am very confused.

The generated code for that markdown looks ok (below), but the first image (https://rcyost.github.io/images/lineGraphRailRoad.png) is 404.

<img src="/images/lineGraphRailRoad.png" alt="&quot;text&quot;"/>
<img src="/images/pressure-1.png" alt="&quot;text&quot;"/>

Ideas:

  • Are there any build error from Github?
  • The two missing images use CamelCase, but the good one is all lowercase. Could case be involved?

The image extension is upper case: https://rcyost.github.io/images/lineGraphRailRoad.PNG while in your script is lowercase

1 Like

Hah! Excellent catch @fabiomux! I tried a few upper/lower case variants, but never thought to tweak the extension.

It looks like the OP is using a file system browser that hides the extensions, so the problem is invisible on their local system. They may also be using a case-insensitive file-system (macOS and maybe Windows), so the site would run fine locally, but fail when uploaded to a case-sensitive file-system (i.e. Github Pages).

1 Like

Thank you @chuckhoupt, yes it is the Windows file manager in the screenshot above and it hides extensions by default, some applications under Windows assign an extension in the upper case format, probably some DOS heritage… :man_facepalming:

1 Like

so why is one file .png and another .PNG on windows?

Possibly the difference is due to some editing or conversion step (e.g. screen-shot software, or editing software used to crop or convert an image). As @fabiomux mentioned, older software may default to uppercase extensions for compatibility with ancient Microsoft OSes.

You should be able to just rename the files to use consistent case for the extensions.

1 Like