7

I followed the Python packaging guide to upload my project to TestPyPI, but the README is missing images.

I read that relative paths to images don't work because PyPI only has the scope of the README itself and (maybe) Sphinx directory? So the README on Codeberg looks normal, but on PyPI it's missing the images.

What can I do so both Codeberg and PyPI can render images?

Ideally, I would like a solution that still allows rendering the images locally after downloading the source files (if that's possible).

I thought of maintaining a clone of the README (something like README.pypi.md), but I don't think that is a good idea. Any thoughts?

top 2 comments
sorted by: hot top controversial new old
[-] Vulwsztyn@programming.dev 2 points 1 week ago

make links absolute links to the images on codeberg

[-] logging_strict@programming.dev 1 points 1 week ago* (last edited 1 week ago)

There are tools to check README files. Which would give suggestions on what needs to be fixed.

If you are using Sphinx anyway, would suggest going with a ReStructuredText rather than vanilla markdown.

In your Sphinx docs, can mix rst and md but the index file must be index.rst, not index.md

Then use this sphinx-external-toc-strict for structuring your Sphinx docs.

restview for real time editing of restructuredtext file

this post was submitted on 28 Mar 2026
7 points (100.0% liked)

Python

7870 readers
2 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS