Images link appears to be broken

I’ve been trying to solve an issue and I’ve been reading lots of discussions here but I can’t fix the problem.

All my images are inside the STATIC folder on the root directory of the project, as it is written on every documentation. But, it is not working for me, what could be the problem?
I use this syntax to place images ![test](/img/portfolio/gravity-paper.jpg)

For more reference this is a link to my repo and to my website:
repo: https://github.com/pamelamartello/20200210-example
website: https://pamelamartello.github.io/20200210-example/portfolio/

any help would be much appreciated, thank you!

@pamelamartello,

When hosting with github pages, using a backslash / in front of the image path will always break your assets because it points to the root which is actually github.io. Your site on github pages is actually hosted inside a subdirectory.

To avoid this, use the actual relative path (e.g img/... or ../img/.. or the full explicit path i.e https://pamelamartello.github.io/img/portfolio/gravity-paper.jpg.

Avoid the backslash, unless your site is hosted on the root directory (which is definitely not the case with github pages).

A post was split to a new topic: URL for image in static directory