How to get the original image after upload (not thumbnail)? #1467
-
I notice that when images are uploaded via API or web app, they always seem to be scaled to 1000px (or 2000px) by width or height, whichever is larger. The problem is, it looks pretty bad to upscale relatively small images, especially when you click them and they expand to fill the entire window. Is there any way to get the original width/height of an image, or is that lost after uploading? If it's lost you really should consider saving it somewhere, so the image could still be displayed at the original size. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Looking through the atproto docs, I found this endpoint: com.atproto.sync.getBlob. It seems to find the original uploaded blob, but how do I access the actual raw image data? The call returns an empty body, but the response headers show the correct mime type and size, so I know it's finding the correct file, I just can't figure out how to actually download it. UPDATE: I was looking at the return value the wrong way; I am getting the binary image blob in the response, and it does show the original size and mime type, so I'll mark this as the answer to my question. (Although I still think clicking images in Bluesky really should display them at the original size.) |
Beta Was this translation helpful? Give feedback.
Looking through the atproto docs, I found this endpoint: com.atproto.sync.getBlob.
It seems to find the original uploaded blob, but how do I access the actual raw image data? The call returns an empty body, but the response headers show the correct mime type and size, so I know it's finding the correct file, I just can't figure out how to actually download it.
UPDATE: I was looking at the return value the wrong way; I am getting the binary image blob in the response, and it does show the original size and mime type, so I'll mark this as the answer to my question. (Although I still think clicking images in Bluesky really should display them at the original size.)