Search code examples
githubdocusaurus

Unable to load images from GitHub in markdown file


I am adding an image in markdown which is hosted on GitHub.

![alt-text](https://github.com/neutraltone/awesome-stock-resources/blob/master/img/splash.jpg)

When I run the docusaurus server using npm start it doesn't load the image for me but returns 404 Not Found.

By visiting the image URL, you can see the hosted image is present.

Any ideas on how to fix this? I'm on Docusaurus 1.14.

Thank you


Solution

  • This is not a Docusaurus issue.

    The image URL is a GitHub page containing the image, of HTML type, not an image file. You can obtain the image URL by right clicking and getting the source. Try this - https://raw.githubusercontent.com/neutraltone/awesome-stock-resources/master/img/splash.jpg