Skip to content

fix(docs): use an absolute URL for the README screenshot so PyPI renders it - #116

Merged
little-did-I-know merged 2 commits into
mainfrom
fix/readme-pypi-image
Jul 26, 2026
Merged

fix(docs): use an absolute URL for the README screenshot so PyPI renders it#116
little-did-I-know merged 2 commits into
mainfrom
fix/readme-pypi-image

Conversation

@little-did-I-know

Copy link
Copy Markdown
Owner

The oscilloscope screenshot at the top of the README doesn't render on the PyPI project page.

Cause

The <img> used a repository-relative path:

<img src="docs/images/sds824x-hd-cal-square.png" ...>

GitHub resolves that against the repo. PyPI renders the README as a standalone document with no repo context, so a relative src has nothing to resolve against and the image silently fails. Everything else at the top of the README survives because the badges are already absolute shields.io URLs — which is why only the screenshot was affected.

The file itself is present and git-tracked, so this was never broken on GitHub.

Fix

An absolute raw URL, verified to resolve before committing (HTTP 200, image/png, 21,732 bytes):

https://raw.githubusercontent.com/little-did-I-know/SCPI-Instrument-Control/main/docs/images/sds824x-hd-cal-square.png

A comment above the tag records why it must stay absolute, so it doesn't get "tidied" back into a relative path.

Two things worth knowing

PyPI project pages are immutable per release. This does not repair the 5.5.0 page — the screenshot appears from the next release onward.

13 relative links in the README have the same problem (CHANGELOG.md, CONTRIBUTING.md, SECURITY.md, LICENSE, examples/, docs/gateway/security.md, and others). They 404 on PyPI for the identical reason. They're deliberately left alone here: making them absolute would fix PyPI but means anyone reading the README on a fork or PR branch gets links pointing back at upstream main rather than their own copy. Worth deciding separately rather than bundling into an image fix.

Verification

  • The raw URL resolves (HTTP 200, correct content type and size).
  • No relative <img> tags remain in the README.
  • docs/about/changelog.md re-synced to CHANGELOG.md and confirmed byte-identical — the two are hand-maintained mirrors and nothing in the suite enforces that.
  • No tests run: this changes no code, and the only test mentioning the README does so in a comment, not by reading the file.

@little-did-I-know
little-did-I-know merged commit a294248 into main Jul 26, 2026
29 checks passed
@little-did-I-know
little-did-I-know deleted the fix/readme-pypi-image branch July 26, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant