Blog

How to Compress PNG Files for Android and iOS App Development

By admin · Jun 4, 2026

In mobile app development, PNG files make up a significant portion of your app bundle size. Icons, splash screens, UI elements, illustrations, and onboarding images all contribute to your APK or IPA size — and large apps have lower install conversion rates, higher uninstall rates, and worse performance on low-end devices.

Why PNG Size Matters in Mobile Apps

Types of App PNG Assets and Target Sizes

Asset TypeTypical Sizes NeededTarget File Size
App icon (iOS)20px to 1024px (multiple sizes)Under 100 KB total for all sizes
App icon (Android)36px to 192px (mdpi to xxxhdpi)Under 50 KB total
Splash screen1×, 2×, 3× for iOS; various for AndroidUnder 200 KB per asset
UI icons (per icon)2×, 3× for iOS; mdpi to xxxhdpiUnder 10 KB per icon
Illustration / onboarding1×, 2×, 3×Under 150 KB per image
Background imagesScreen resolution variantsUnder 300 KB

iOS PNG Compression Workflow

Asset Catalog Compression (Xcode)

iOS stores PNG assets in .xcassets folders. Xcode automatically runs pngcrush on PNGs during build — but pre-compressing with pngquant achieves much greater savings.

Step-by-Step for iOS

  1. Export PNG assets from your design tool (Sketch, Figma, Adobe XD)
  2. Compress with compresspngfile.com (batch upload all sizes at once)
  3. Add compressed PNGs to your .xcassets in Xcode
  4. Xcode's pngcrush runs on already-compressed files — minimal additional compression
  5. Result: app bundle significantly smaller than uncompressed PNGs

Android PNG Compression Workflow

Android Resource Folders

Android uses density-specific resource folders: drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi.

Step-by-Step for Android

  1. Export PNG assets at 4× (xxxhdpi) from your design tool
  2. Scale down to create mdpi, hdpi, xhdpi, xxhdpi versions
  3. Batch compress all density variants with compresspngfile.com
  4. Place compressed PNGs in appropriate drawable folders
  5. Build APK — significantly smaller bundle size

Using pngquant in Your Build Pipeline

For automated compression in your CI/CD pipeline:

# Android: compress all drawable PNGs before build
find app/src/main/res -name "*.png" -exec pngquant --quality=65-80 --ext .png --force {} \;

# iOS: compress all asset catalog PNGs before build
find . -path "*.xcassets/*.png" -exec pngquant --quality=65-80 --ext .png --force {} \;

Real App Size Reduction Results

App TypeBefore PNG CompressionAfter PNG CompressionSavings
Simple utility app (50 PNG assets)12 MB3.2 MB73%
Social media app (200 PNG assets)45 MB10 MB78%
Game with sprite sheets (500 PNG assets)120 MB26 MB78%
E-commerce app (100 PNG assets)28 MB6 MB79%

Vector vs PNG: When to Use Each

Where possible, use vector formats (SVG on web, PDF/SVG on iOS, VectorDrawable on Android) for UI icons — they scale perfectly and have tiny file sizes. Use PNG for:

Conclusion

PNG compression is one of the easiest ways to significantly reduce your app bundle size. For the design-to-development handoff, use compresspngfile.com to compress all PNG assets before adding them to your Xcode or Android Studio project. For automated CI/CD compression, integrate pngquant into your build scripts.