Search code examples
read-the-docs

Read the Docs PDF doesn't include images


I have begun a documentation project on Read the Docs, building from a GitHub repo. I set it up as a Sphinx project, and am using Markdown in the content. The main reason for this is take advantage of GitHub's Markdown preview which is great.

I have jpg images in the docs that are pulled in with the urls from where they reside on GitHub. I just tested out the PDF download, and noticed that none of the images were include in the download. Is it possible to have that happen? Do I need to set things up differently?

I have read the read the docs docs (fun phrase) and looked in the github issues, but didn't see anything that addressed this directly...


Solution

  • Turned out that the problem was using an http reference to the images where they where uploaded to github. When I did that, the RTD PDF did not include the images.

    ![hey dubuque library](https://github.com/legiongis/clitoolbox/raw/master/docs/img/dubuque_library.jpg "Hello Dubuque!!")

    However, changing this to a relative path from the markdown file solved the problem.

    ![hey dubuque library](img/dubuque_library.jpg "Hello Dubuque!!")