Media Optimization in Apps

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

See the section bibliography for the reference material consulted while preparing these pages.

Native SDKs often lack a full image pipeline: SwiftUI’s AsyncImage has no dedicated image cache, no prefetching and no downsampling, and a plain ImageView or Image decodes whatever it is given. This sub-section documents the libraries that fill the gap on each platform, how to show a BlurHash while an image loads, how to play adaptive video, and how to compress and upload media from the device. It is current as of 2026-10-07. The server side is in Media Optimization for the backend.

flowchart LR API["API: variants, blurhash, manifest"] --> IMG["Image library: cache, downsample, placeholder"] API --> VID["Video player: HLS or DASH"] CAM["Camera or gallery"] --> CMP["Compress on the device"] CMP --> UP["Background upload with a pre-signed URL"] UP --> API

Pages

Page What it covers

Android: Coil, Glide and BlurHash

Coil 3 caches and network artifacts, Glide and DiskCacheStrategy, Fresco, and a BlurHash placeholder.

Android Video with Media3

ExoPlayer for HLS and DASH, SimpleCache, Transformer compression and cover frames.

iOS: Kingfisher, Nuke and BlurHash

KFImage, DownsamplingImageProcessor, Nuke pipeline and LazyImage, SDWebImage, and the limits of AsyncImage.

iOS Video with AVFoundation

AVPlayer with HLS, AVAssetImageGenerator, AVAssetExportSession and background uploads.

React Native and expo-image

expo-image with blurhash and thumbhash, caching, react-native-blurhash, react-native-fast-image and react-native-video.

Kotlin Multiplatform and Flutter

Coil 3 multiplatform, KMP BlurHash, expect and actual video players, cached_network_image and flutter_blurhash.

Device-Side Compression and Uploads

When to compress on the phone, HEIC and HEVC from iOS, background and resumable uploads.

Cheat Sheet (PDF)

A one-page summary of the libraries per platform, placeholder and cache settings.

Bibliography

Every source below is the official site, repository or documentation page of the library, service or standard it supports. Links were checked from an authoring environment with restricted outbound access. Entries marked (unverified) could not be opened from there (the site refused or blocked the request), so open them and confirm the content, version and status before you rely on them. Entries without the mark were opened successfully, or, for package pages, confirmed through the package registry.

React Native and Expo

Uploads

Other sources