You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Image from a link: 
Testing using image from package path: 
My Platform
Checked in Chrome 71 and IE 11
Additional context
The warehouse image link says Not Found
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.
Reacted by jeff-hernandez, Mathew Shen, Aliabbas Merchant, Haren S, Mahesh Kumaran, Stefan Appelhoff, Jason Young, Saad Mairaj, urswilke, Bao and 2 more
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.
Activity
ewdurbin commentedon 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.
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 commentedon Jan 4, 2019
Thanks @ewdurbin
Use absolute URLs for images to display them on PyPI
Borda commentedon 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 commentedon 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.
fix logo on pypi
fix logo on pypi (#1999)
Fix README images not showing on PyPI (pypi/warehouse#5246)
docs: Absolute GitHub image URLs in README for PyPI
fix: use absolute URLs for README images (PyPI compatibility)
fix: use absolute URLs for README images (PyPI compatibility)
fix: use absolute URLs for README images (PyPI compatibility)
feat: add PyPI publishing workflow and readme metadata (#2915)
feat: add PyPI publishing workflow and readme metadata (#2915)