Media on Swiggy's Mobile Apps
Article Summary
Swiggy's mobile apps serve millions of users across wildly different devices and network conditions. How do you deliver high-quality images and videos without killing performance or burning through bandwidth costs?
Vignesh Muralidharan from Swiggy's Consumer Apps team breaks down their media optimization strategy. The article reveals four key techniques they use to balance visual quality with load times, from codec selection to intelligent caching.
Key Takeaways
- VP9 video encoding reduced average response time by 42% vs H.264
- AVIF images cut response time by 21% compared to WebP
- Network-aware resolution: 40% smaller images during poor connectivity
- Intelligent cache search reuses higher-res cached images during slow networks
- Dynamic resizing matches image resolution to actual view dimensions
Swiggy reduced media load times by over 40% while improving visual quality through smart codec choices, network-adaptive resolution, and cache optimization.
About This Article
Swiggy's app relies heavily on media, but handling high-resolution images on-device is expensive. Resizing, scaling, and transforming these images takes a lot of processing power and memory, which slows down how quickly pages render on different phones and devices.
Swiggy built MediaUrlProvider to request images at the exact size needed for each view. Instead of processing images on the phone, they resize and cache optimized versions in their CDN through their media management service.
By requesting the right image sizes upfront, Swiggy cut down on device processing and memory use. This made pages load faster and the app more responsive, without asking users to buy new phones.