Design Photo Upload With On-Device Resizing and Server-Side Thumbnails
Last updated: November 29, 2026
Quick Overview
Design the path from a user picking a photo in the Facebook app to it appearing in their post, including client-side compression, upload, server generation of multiple sizes, and serving the right size to viewers.
Meta
November 29, 20260
0
0 solved
Design the path from a user picking a photo in the Facebook app to it appearing in their post, including client-side compression, upload, server generation of multiple sizes, and serving the right size to viewers.
This is an entry-level media question that tests practical judgment about where work belongs: on the device to save bandwidth, or on the server for consistency. The interviewer checks sizes, formats, metadata handling, and what the user sees while processing.
What the Interviewer Expects
- Resize and compress on the device before upload
- Strip sensitive metadata such as GPS location
- Generate a set of renditions on the server
- Serve the right size per device and layout
- Show an optimistic local preview while uploading
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- Why not upload the full original?
- Which image format would you serve to modern clients?
- How do you handle a 50 MP photo on a low-end phone?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: pick one or more photos; post them; viewers see them quickly on any screen size.
Non-functional: minimize upload bytes on mobile data; post visible within a couple of seconds of t...
High-Level Design
- Client decodes the photo, applies orientation, resizes the long edge to a cap (for example 2048 px), and encodes as JPEG or a modern format at a tuned quality. It strips EXIF except needed fiel...