Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

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

In my readme on GitHub I have several images that are present there in my project's source tree which I reference successfully with directives like

.. image:: ./doc/source/_static/figs/moon_probe.png

I would also like to have these images appear when this same readme is generated in PyPi.

How do I (a) ensure that images are present on PyPi for the readme to access and (b) formulate the .. image:: directive to access them?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report

0

Go to the image address in the Github repository. The path shown will be like this: https://github.com/tensorbored/kds/blob/master/docs/_static/readme_lift.png enter image description here Change the blob term in the image address to raw https://github.com/tensorbored/kds/raw/master/docs/_static/readme_lift.png enter image description here

over 4 years ago · Santiago Trujillo Report

0

If you have your images on Github, navigate to the image then right click on download button and copy link address:

enter image description here

Then you can add it in your README.md file:

![](https://github.com/your_username/your_repository/raw/master/images/img2.png)

It should be rendered properly both on Github and PyPi.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!