Skip to content

fix: share higher resolution images to Bluesky#1085

Open
vytisbulkevicius wants to merge 2 commits into
developmentfrom
bugfix/pro/651
Open

fix: share higher resolution images to Bluesky#1085
vytisbulkevicius wants to merge 2 commits into
developmentfrom
bugfix/pro/651

Conversation

@vytisbulkevicius

@vytisbulkevicius vytisbulkevicius commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Images shared to Bluesky were low-resolution/blurry because the pipeline always used the WordPress large size (~1024px). That size was used because Bluesky's uploadBlob endpoint rejects images larger than 1,000,000 bytes.

This picks the largest available image size that still fits the limit — trying full2048x20481536x1536large — so the sharpest acceptable image is uploaded. For external images, an unresolved attachment, or when nothing larger fits, the original URL is returned unchanged, so it is never worse than before. The limit and size priority are filterable (rop_bluesky_max_image_bytes, rop_bluesky_image_size_priority).

Will affect the visual aspect of the product

NO

Test instructions

  • Use a tall/high-resolution featured image (e.g. ~1700×4670) on a post.
  • Share it to a connected Bluesky account.
  • Confirm the uploaded image is larger/sharper than the old large size (e.g. ~2048px tall) and the post still publishes.
  • Use a small image and confirm it still shares unchanged.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/tweet-old-post-pro/issues/651

Bluesky rejects image blobs over 1,000,000 bytes, so the shared image always
used the WordPress "large" size and often looked blurry. Pick the largest
available size (full, 2048, 1536, large) whose file is within the limit, and
fall back to the original URL on any failure so behaviour is never worse.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Jun 19, 2026
@pirate-bot

pirate-bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Plugin build for 5558d6f is ready 🛎️!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants