Formats
Which image formats FastImage shows on iOS and Android, from which versions, and what decodes each one. The README has the short version, for recent iOS and Android versions.
These are tested on iOS 27 and Android 16 in the example app (the regression runner’s formats cases); the minimum versions are the ones Apple and Android give for decoding the format. An image in a format that doesn’t load fails with onError. On the web, the browser shows the image, so it’s the formats the browser supports.
FastImage loads images with SDWebImage, which decodes most formats with ImageIO, Apple’s image decoder.
| Format | Shows | Decoded by |
|---|---|---|
| JPEG | Yes | ImageIO |
| PNG | Yes | ImageIO |
| APNG | Animated | ImageIO, animated by SDWebImage |
| GIF | Animated | ImageIO, animated by SDWebImage |
| WebP | Animated | Still ones ImageIO, animated ones libwebp |
| AVIF | iOS 16+; animated | ImageIO, animated by SDWebImage |
| HEIC | Yes | ImageIO |
| SVG | Yes (SVG images) | SDWebImageSVGCoder (Apple’s SVG renderer), which FastImage includes |
| ICO | Yes | ImageIO |
| BMP | Yes | ImageIO |
| TIFF | Yes | ImageIO |
| ICNS | Yes | ImageIO |
| PSD | Its composite image | ImageIO |
On tvOS (tested on tvOS 27 in the tvOS example), the same formats show except ICNS and PSD, which tvOS’s ImageIO doesn’t decode.
Animated WebPs are decoded with libwebp, from SDWebImageWebPCoder, which FastImage includes. FastImage registers its coder for animated WebPs, unless the app has registered a WebP coder itself (libwebp’s, or SDWebImage’s ImageIO one), which then decodes them instead. Animated AVIFs are decoded with ImageIO too, by FastImage’s coder for them (SDWebImage’s own only decodes their first frame), unless the app has registered libavif’s coder (SDWebImageAVIFCoder), which then decodes them instead.
Android
Section titled “Android”FastImage loads images with Glide, which decodes most formats with Android’s own decoders.
| Format | Shows | Decoded by |
|---|---|---|
| JPEG | Yes | Android’s decoder |
| PNG | Yes | Android’s decoder |
| APNG | Animated (Animated PNG) | APNG4Android, which FastImage includes |
| GIF | Animated | Glide’s GIF decoder |
| WebP | Yes; animated ones Android 9+ | Android’s decoder; animated ones ImageDecoder (an AnimatedImageDrawable) |
| AVIF | Android 14+1; animated | Android’s decoder; animated ones ImageDecoder (an AnimatedImageDrawable) |
| HEIC | Android 8+ | Android’s decoder |
| SVG | Yes (SVG images) | AndroidSVG, which FastImage includes |
| ICO | Yes | Android’s decoder |
| BMP | Yes | Android’s decoder |
| TIFF | No | |
| ICNS | No | |
| PSD | No |
SVG images
Section titled “SVG images”SVG images (remote, bundled with require(), or local files) load with SDWebImageSVGCoder on iOS and AndroidSVG on Android, which FastImage includes. On Android, an app with AndroidSVG’s other package (com.caverock:androidsvg) leaves FastImage’s out: see duplicate AndroidSVG classes.
An SVG is drawn at the size it’s shown at, so it’s sharp at that size (with downsample={false}, on iOS at its own size if that’s larger, for zooming in on it), and then works like any other image: objectFit, tintColor, blurRadius, transition and caching. onLoad reports the SVG’s own size: its width and height, or its viewBox’s (300x150 if it has neither). Animated SVGs (SMIL or CSS animations) show their first state.
Animated PNG (Android)
Section titled “Animated PNG (Android)”APNG (animated PNG) images animate on Android with APNG4Android, which FastImage includes.
APNGs work like other animated images: loop, paused (which continues from the frame it paused on), and a still first frame with blurRadius. Each frame is decoded as it plays, at about the size it’s shown at, off the main thread.
One bundled with your app (require()) needs PNG compression turned off to animate in release builds.
Footnotes
Section titled “Footnotes”-
Android 14 is the first version that requires an AVIF decoder; many devices on Android 12 and 13 have one too. ↩