None of my pictures will show from my assets folder. Does anyone have any suggestions.
Thanks for being here! sharing you repo here would help our community take a look and see how we can help.
Since the original question is not answered, and I have the same issue, I’m going to “jump on the ride”.
Here is the address to My repository. It is a private repository for the moment, but I’ve taken the liberty to make you a collaborator.
I’m just starting with Github Pages, Jekyll, Markdown and Git. So my blog is “under construction”. In the local server, everything looks as intended. I can see the images of the only post with images. Once I push the changes to the repository, GitHub seems it does not “find” the files.
To try to solve the issue, I have tried to load the image using what I guess is html script:
And to add the slash within a relative path in markdown:
Nothing seems to work. Any lights on the problem are mos welcomed.
In advance, thank you very much for your help.
Hi @diazlg! This topic is so old, it’s a wonder you managed to find it
You’re most likely facing the same problem in this thread here, I’d recommend having a read of that and looking at my solution:
Because your site has a repository name
PSLightning in the URL this can cause some differences in how you need to reference your assets between your Pages site and on GitHub.com.
In this case I’d recommend converting your image references to markdown, then using a non-relative path starting with a
/, but without a specific domain (no https://diazlg.github.io/).
/ causes the browser to search from the root of your domain, rather than relative to the folder you’re in, so make sure to build your path as if you’re starting from the root of your repository when entering the path to your images.
Finally, to make it work on Pages, you’ll need to make sure your site’s
baseurl value is set correctly. You’ll need to create a file called
_config.yml at the root of your site (if you don’t have one already) and set the following:
This should make your images work on both Pages and on GitHub.com.