I would like an image linked in my README.rst file to be displayed when I upload my package to PyPI. In my README I have:
.. image:: example-python.png
:height: 100px
:width: 200px
:scale: 100 %
:align: center
and in MANIFEST.in I have:
# Include the image file
include example-python.png
Right now it's not displaying in testpypi. It shows up just fine on GitHub, however. Am I doing something wrong?
In .. image:: example-python.png
you use relative URL, i.e. a browser expects the image in the same directory as the package. I doubt it's possible to upload an image at PyPI. Upload it somewhere and change the URL to be an absolute URL. An image already at Github is ok I think.
include
directive in MANIFEST.in doesn't work because it includes the image into source (sdist) archive where browsers will never look it up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With