Repository navigation
Bluesky.create: upload images in cited attachments for external embed thumbs - #1214
Merged
Merged
Conversation
… thumbs, for snarfed#1195 Signed-off-by: Michael Bishop <howdy@michaelbishop.me>
snarfed
reviewed
Oct 7, 2026
snarfed
enabled auto-merge (squash)
October 7, 2026 03:26
Co-authored-by: Ryan Barrett <github@ryanb.org>
snarfed
force-pushed
the
bluesky-cite-thumbs
branch
from
October 7, 2026 03:37
8c8dd50 to
03909dd
Compare
Owner
|
Done! I'm deploying this to Bridgy classic now... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1195.
createnow also uploads images inarticle/link/noteattachments, soto_external_embedfinds a blob to use asthumb. They’re kept out ofimagesso they don’t turn the post into an images embed.These uploads are best effort: if a cited image can’t be fetched, or it’s over the
thumblexiconmaxSize, it logs a warning and posts the embed without a thumb, which is what happens today. That needed amax_sizekwarg onupload_media. I modeled it on how Bridgy Fed fetches blobs inatproto.py.Happy to change it if you’d rather these fail loudly, or want the check somewhere else.
Two things I left out. Let me know if you want either:
accept(
image/*).at://andbsky.app URLs), where the image is never used.
Tests cover the thumb, a 404, and an oversized image.
I could follow what was happening with the failing on the end result (image not showing up) and was able to trace it back, but to be clear I only half read Python so I leaned on Claude for the rest.