Image Format Optimization

iOS

Images that would be significantly smaller in HEIC format. PNG-to-HEIC conversion typically saves 80-90%, JPEG-to-HEIC around 50%.

Images stored as PNG or JPEG in the app bundle that would be significantly smaller in HEIC (High Efficiency Image Coding). HEIC uses HEVC compression and offers up to 50% smaller files compared to JPEG at equivalent visual quality, and dramatically smaller than PNG for photographic content. Supported since iOS 11 (2017) and in Asset Catalogs since Xcode 10 (2018).


Why this happens

  • PNG is the historical iOS default. Developers continue using PNG out of habit, even for photographic content where lossless compression is wasteful.

  • Xcode's CgBI optimization (proprietary PNG processing with pre-multiplied alpha and BGRA swap) can actually make files larger.

  • Many PNGs have unnecessary alpha channels. Fully opaque images stored with transparency support are 32-bit instead of 24-bit.

  • Lack of awareness. HEIC has been supported for years but adoption has been slow.


Size impact

Image format conversion is one of the highest-ROI optimizations with minimal effort.

PNG (photographic) to HEIC

80-90% reduction

JPEG to HEIC

~50% reduction

PNG to WebP (lossless)

~26% reduction

Apple WWDC19 demo

24.6 MB to 14.9 MB (40% total with Asset Catalogs)


How we detect it

Uses macOS sips to perform actual HEIC conversion and measures real savings. Checks PNG files >= 5 KB, JPEG files >= 10 KB, and WebP files >= 10 KB. For PNGs, also checks for alpha channel presence. Only reports if actual measured savings are positive. This is a real conversion test, not an estimate.


How to fix

1

Use Asset Catalogs with lossy compression

Place images in .xcassets and set compression to "Lossy" or "Automatic". Xcode automatically converts to HEIF during compilation for iOS 12+ targets.

2

Set deployment target to iOS 12+

Enables the full Asset Catalog HEIF pipeline.

3

Remove unnecessary alpha channels

Detect PNGs with fully opaque alpha using sips or similar tools. Removing alpha from a 32-bit PNG can yield up to 70% savings.

4

Pre-optimize with ImageOptim

Disable Xcode's "Compress PNG Files" build setting (it undoes third-party optimization) and use ImageOptim instead.

5

Consider WebP for cross-platform

For iOS 14+, WebP offers good compression with transparency support.


Powered by Bitrise, trusted by 8,500+ brands

Size Analyzer is built by Bitrise, the leading mobile DevOps platform used by over 400,000 developers at companies like Shopify, TripAdvisor, and BuzzFeed. Free forever. No signup required.

Bitrise provides a full-stack mobile DevOps solution that unites the tools, processes, and testing frameworks engineering teams need to ship best-in-class mobile experiences.

Bitrise logo