Skip to content

01a04a23 - Give Damus image URLs a .jpg/.png/.webp extension - #73

Merged
TaprootFreak merged 2 commits into
developfrom
01a04a23-photo-ext
Aug 30, 2026
Merged

01a04a23 - Give Damus image URLs a .jpg/.png/.webp extension#73
TaprootFreak merged 2 commits into
developfrom
01a04a23-photo-ext

Conversation

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
Damus showed forum photos as a website card (photo / dev-api.21.gifts) because the URL ended in /photo with no image extension. Kind:1 and imeta now use /photo.jpg (or .png / .webp), and the API serves those paths. Already-published unpaid photo notes are re-signed so Damus can embed them.

DE:
Damus hat Foren-Fotos als Website-Karte (photo / dev-api.21.gifts) gezeigt, weil die URL auf /photo ohne Bildendung endete. Kind:1 und imeta nutzen jetzt /photo.jpg (bzw. .png / .webp), und die API liefert diese Pfade. Bereits veröffentlichte, unbezahlte Foto-Notes werden neu signiert, damit Damus das Bild einbettet.

Details

Damus iOS treats URLs without .jpg/.png/.webp as web links (compass icon), even when NIP-92 imeta is present.

forumPhotoUrl appends the MIME extension. GET /messages/:id/photo.jpg (and jpeg/png/webp) returns the same bytes as /photo, with Access-Control-Allow-Origin: * and Content-Disposition: inline. listSignedMissingPhoto now requires photo. plus an extension, so existing notes with a bare /photo are re-signed after deploy.

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 1 review pass.
Damus can embed forum photos because the public URL now ends in .jpg / .png / .webp instead of a bare /photo path that Damus treats as a website.

DE:
Bereit nach 1 Review-Durchlauf.
Damus kann Foren-Fotos einbetten, weil die öffentliche URL jetzt auf .jpg / .png / .webp endet statt auf ein nacktes /photo, das Damus als Website behandelt.

Details

Quality nits (handbook Content-Disposition, .jpeg in TSDoc) fixed in 7b41669. Logic: 0 findings. Mergeable check follows. CI on this head: Typecheck, Lint, Handbook, E2E-check, Test (100% coverage), Build, E2E — success.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 30, 2026 13:47
@TaprootFreak
TaprootFreak merged commit 4790ce0 into develop Aug 30, 2026
2 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