Sitemap

Why are you using PNG images when you have Vector and SVG images?

Stop Using PNGs! SVG & Vector Best Practices in Jetpack Compose

Learn why we prefer SVG over PNG images in Jetpack Compose.

--

Press enter or click to view image in full size
Photo by Mel Lituañas on Unsplash

Not a Medium Member? “Read For Free”

If you are still using PNG icons in the app, you are approaching mobile development the wrong way.

Using PNG icons or images requires multiple sizes of each icon, which can significantly increase the app size.

Don’t worry, we have the solution—using Vector and SVG in Jetpack Compose for a more concise and faster UI.

Why You Should Not Use PNG

PNG images are pixel-based,

  • It requires multiple copies (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi) of a single image to be used in Android.
  • They can easily increase the size of the APK.
  • They don’t perform better on tablets and foldable devices.

--

--

Jayant Kumar🇮🇳
Jayant Kumar🇮🇳

Written by Jayant Kumar🇮🇳

Jayant Kumar is a Lead Software Engineer, passionate about building modern Android applications. He shares his expertise in Kotlin, Android, and Compose.

No responses yet