How do I add images to a PyPI readme (that works on GitHub)?

PyPI will not read your package distributions for the image. You have to use the image’s external link, for example:

.. image:: https://raw.githubusercontent.com/greyli/flask-share/master/images/demo.png

If you are using Markdown description, use this:

![](https://raw.githubusercontent.com/greyli/flask-share/master/images/demo.png)

Be sure to replace the URL in the above examples with your image URL, here I use the image hosted by GitHub, the real demo is on PyPI.

P.S. To get the image’s raw link on GitHub, right-click the image and choose Copy image address.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)