-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Images not displayed though compilation is successful #6065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you link to a page where you expect the image and isn't there? Also, take into consideration that images should have a relative path, since when you host your docs on rtd, the pages are in |
Thanks for your quick reply. Here's a link of a subsection where the image should be: https://tunacell.readthedocs.io/en/latest/users/tutorial.html#calling-the-plotting-function (scroll at the bottom of the subsection). I tried the relative path in the source document for this image. If you scroll down, there are a couple of images where I put the absolute path from the root directory (docs/ in the repo). The link is actually present, so I am guessing that paths are alright. However when clicked I get a message saying that the image cannot be displayed because it contains errors, which is not the case locally, and the PNG image is correctly displayed from the Github repo, see https://github.com/LeBarbouze/tunacell/blob/master/docs/images/tutorial_sample-plot.png. I mention that these images are git using git LFS, no clue if it's helpful or not. In the compilation logs, the image are correctly copied, so I don't get what happens. |
@stsewd I've added links in the comment above, and also edited the issue description. Thanks for pointing to those details. |
I think maybe that's the problem. I don't have experience with git lfs, but I've seen this #1846 |
This is definitely the issue. I wrote a workaround some time ago to make it work under Read the Docs: #1846 (comment) Keep in mind that this is not officially supported by Read the Docs. That said, let us know if you were able to make it work. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. Thanks! |
Hello guys @stsewd @humitos, thanks for your kind help. I implemented one of the workarounds proposed in #1846 and it works fine. I used the one with the Python git_lfs module. @humitos's reply with calling the OS to download the git LFS client seems to be a valid solution as well, without the need to rely on another Python module. I guess the incentive to implement Git LFS compatibility in ReadTheDocs is only growing in the community of RTD users. All the best with this piece of work if you guys get to it! |
@LeBarbouze thanks for the update on this! I'm happy you were able to figure it out. |
Details
Expected Result
I expect the images to be actually displayed, for instance here https://tunacell.readthedocs.io/en/latest/users/tutorial.html#calling-the-plotting-function (scroll at the bottom of the subsection).
This is actually what I get with a local build on my computer (same sphinx version 1.8.5 than in the compilation at readthedocs).
Actual Result
The browser only shows up the (relative) path as a link, and inspection shows that the image "cannot be displayed". The link actually works (it's not a 404 problem). The browser warns the image contains errors. However the PNG image can be read from the GitHub repo, see for instance https://github.com/LeBarbouze/tunacell/blob/master/docs/images/tutorial_sample-plot.png.
The compilation is marked "successful", and the logs indicate the images have been copied.
The text was updated successfully, but these errors were encountered: