Skip to content

fix(images): repair three regressions from the self-hosting migration - #1911

Merged
zksquirrel merged 1 commit into
ZecHub:mainfrom
bloxster:i18n/fix-image-migration-regressions
Jul 29, 2026
Merged

fix(images): repair three regressions from the self-hosting migration#1911
zksquirrel merged 1 commit into
ZecHub:mainfrom
bloxster:i18n/fix-image-migration-regressions

Conversation

@bloxster

@bloxster bloxster commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The self-hosted-image migration (#1888, 3ec05852) left 74 _unavailable.svg placeholders across site/. Most of those need the missing image fetched and added to the frontend's public/content-images/, which is a zechub-wiki change and out of scope here.

These three are different: they are fixable in this repo and they are outright regressions — each one replaced something that was working.

Three lines changed, one per file.

1. A working inline image was downgraded to a placeholder

site/Using_Zcash/Zcash_Mining_Pools.md

The page carried an inline base64 data: image. A data URI issues no network request at all, so it was already the most privacy-preserving form an image can take — there was nothing to self-host. The migration replaced it with _unavailable.svg, turning a working, leak-free image into a broken one for no benefit.

Restored verbatim from 3ec05852^. Verified: data:image occurrences go 0 → 1, _unavailable 1 → 0.

2. An author-credit link was destroyed

site/ZFAV_Club/Guides_for_Creators/Livestream_Setup.md line 20

The migration regex matched a link nested inside image alt text and overwrote its href:

-![… Author: [decentralistdan](https://twitter.com/decentralistdan)](…)
+![… Author: [decentralistdan](/content-images/_unavailable.svg)](…)

This is a link, not an image, so it costs a reader nothing at page load — it only resolves if they click. The identical credit line two lines below (line 22, the visible caption) was untouched, so the page currently contradicts itself; this restores the pair to matching.

3. Malformed image reference

site/Research/ZK_Shielded_Asset_Platforms.md line 93

-![Secret.png](/content-images/_unavailable.svg).png)
+![Secret.png](/content-images/_unavailable.svg)

Root cause worth recording: the original URL ended in Untitled_(4).png, and those unescaped parentheses already broke markdown parsing at the first ). The migration substituted up to that point and left .png) behind as stray literal text rendering on the page. This removes the stray fragment. The image itself still needs re-hosting, so the placeholder stays for now.

Scope

This PR fixes only the three regressions above. The other _unavailable.svg placeholders in site/ are not addressed here and are not caused by the migration — they pre-date it. Spot-checked example: Using_Zcash/Spend_Zcash/Top_10_Places_to_spend_ZEC.md references its images as relative paths from a Notion export (Places%20to%20Spend%20ZEC%20b8e9…/…png) whose asset directory was never committed to the repo, so those images have been broken since the page was added and resolve to a 404 today. The migration's placeholder is an accurate report of a pre-existing loss, not damage it caused.

They are worth cleaning up, but that is separate work and separate from this PR.

Why this matters beyond the three lines

These placeholders are currently blocking translation work. In the companion PR (#1910) the translated trees are brought in line with the self-hosted image URLs, but 11 pages are deliberately held back because their English side now points at _unavailable.svg while the translations still hold working URLs — propagating the placeholder would degrade 18 locales to match a regression. Those 11 pages stay flagged stale until the images are recovered, so fixing them upstream unblocks that last slice.

🤖 Generated with Claude Code

The self-hosted-image migration (ZecHub#1888, `3ec05852`) left 74 `_unavailable.svg`
placeholders across `site/`. Most need the missing image re-hosted, which is a
frontend-repo change. These three are fixable here and are outright
regressions, not just missing files.

1. `Using_Zcash/Zcash_Mining_Pools.md` — a working **inline base64 `data:`
   image** was replaced with `_unavailable.svg`. A data URI makes no network
   request at all, so it was already the most privacy-preserving form possible;
   the migration downgraded a working image to a placeholder for no benefit.
   Restored verbatim from `3ec05852^`.

2. `ZFAV_Club/Guides_for_Creators/Livestream_Setup.md` — the migration regex
   matched a link **nested inside image alt text** and overwrote its href,
   destroying an author-credit link:

       Author: [decentralistdan](https://twitter.com/decentralistdan)
    -> Author: [decentralistdan](/content-images/_unavailable.svg)

   This is a link, not an image, so it costs nothing at page load; it only
   resolves if a reader clicks it. Restored, and it now matches the identical
   credit line still intact two lines below (line 22).

3. `Research/ZK_Shielded_Asset_Platforms.md` — malformed image reference:

       ![Secret.png](/content-images/_unavailable.svg).png)

   Root cause: the original URL ended in `Untitled_(4).png`, whose unescaped
   parentheses already broke markdown parsing at the first `)`. The migration
   substituted up to that point and left `.png)` as stray literal text.
   Removed the stray fragment. The image itself still needs re-hosting.

Not addressed here: the remaining `_unavailable.svg` placeholders, which need
the source images fetched and added to the frontend's `public/content-images/`.
The heaviest are `Using_Zcash/Spend_Zcash/Top_10_Places_to_spend_ZEC.md` (19),
`zechubglobal/*/zksnarks` (6 each) and
`ZFAV_Club/Guides_for_Creators/Community_Broadcasting.md` (4).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zksquirrel
zksquirrel merged commit 3c569cb into ZecHub:main Jul 29, 2026
1 of 4 checks passed
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.

2 participants