Skip to content
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

Markdown Images are not rendered in pypi #5246

Closed
kirankotari opened this issue Jan 3, 2019 · 4 comments
Closed

Markdown Images are not rendered in pypi #5246

kirankotari opened this issue Jan 3, 2019 · 4 comments

Comments

@kirankotari
Copy link

Describe the bug
Images are not rendered in pypi from README.md file
Package link: https://pypi.org/project/shconfparser

Image Size:
sh_cdp_neighbour.png - 184 KB
sh_run.png - 855 KB

Expected behavior
Images need to be rendered, as shown in the following link
Github link: https://github.com/kirankotari/shconfparser

To Reproduce
Image from a link:
![show run to tree structure](https://github.com/kirankotari/shconfparser/blob/master/asserts/img/sh_run.png)

Testing using image from package path:
![show run to tree structure](/asserts/img/sh_run.png)

My Platform
Checked in Chrome 71 and IE 11

Additional context
The warehouse image link says Not Found

@ewdurbin
Copy link
Member

ewdurbin commented Jan 3, 2019

The issue appears to be that the URLs used for the links target a GitHub page, not an image directly.

I loaded the README.md into Macdown on my computer locally and can reproduce.

screen shot 2019-01-03 at 8 24 13 am

If you navigate to https://github.com/kirankotari/shconfparser/blob/master/asserts/img/sh_run.png in a browser you'll see that a UI appears, not the image itself.

GitHub seems to be handling this seamlessly.

You could use the raw URL instead as a workaround, https://github.com/kirankotari/shconfparser/raw/master/asserts/img/sh_run.png

PyPI does not support rendering from the package path itself, as it is not an image host.

I'm not sure if there is a reasonable approach to automatically handling either case.

@kirankotari
Copy link
Author

Thanks @ewdurbin

@Borda
Copy link

Borda commented Dec 7, 2020

Hello, we have some problem with rendering GitHub status badges - https://pypi.org/project/pytorch-lightning/1.0.8/
so we tried to download all badges locally and add then to the package distribution on the fly (when the package is created) but this approach does not work as readme cannot take local images from the package - https://stackoverflow.com/a/46875147/4521646
so is there a way or suggestion on how to upload the images/badges to a public domain and later refer in the readme? Moreover, are these referred imaged downloaded by PyPI or what happens if the image changes over time or it is removed?

@di
Copy link
Member

di commented Dec 7, 2020

Hi @Borda - many users upload images to GitHub or another image hosting service (like imgur) or host the images on their own domain. PyPI will link directly to the image, so if the hosted image is changed or removed, it will change on PyPI as well.

0xalpharush added a commit to crytic/slither that referenced this issue Jun 24, 2023
PyPI needs a link to properly render the logo
xref pypi/warehouse#5246
0xalpharush added a commit to crytic/slither that referenced this issue Jun 24, 2023
PyPI needs a link to properly render the logo
xref pypi/warehouse#5246
tom-andersson added a commit to alan-turing-institute/deepsensor that referenced this issue Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants