Menu

Private Avatar Storage and Signed URLs for Authenticated Profile Images
📰

Private Avatar Storage and Signed URLs for Authenticated Profile Images

DEV Community: authentication·HieronymusFox1257·11 days ago
#6fpOqYye
#devtoauthentication#devto#dev#storage#object
Reading 0:00
15s threshold

Short answer: for authenticated profile images, use private object storage and short-lived signed URLs; use a public CDN URL only for avatars that are intentionally public and shareable.

Large avatar files change the answer. The delivery path, not the file extension, determines the design. Keep private objects private and mint a signed URL after authorization.

That is the before-and-after mental model: before, the browser receives a permanent path and your access policy ends at the bucket; after, the application checks the user, asks storage for a temporary read, and gives the browser only that scoped URL. The bytes still flow directly from object storage, so the application does not become a file proxy for every account page.

Cost is a secondary check, not the URL policy

Storage billing matters, but it should follow the access contract.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.