Reduce APK Size on Android

I’m one of those that believe good graphics are crucial to good UI/UX, if used correctly. If you’ve used Snap Search, you’ll find lots of banners and vector images used throughout the app. However, it comes with a very obvious risk: loading large images can slow down your app, and increase the apk size. I have a total 321 files in the drawable folder for Snap Search, and the following method is my easy trick to reduce APK size on Android.

For those who are in a hurry and just want to know it quickly, these are the steps I follow:

  • Save your image as a .png file
  • Compress your image using TinyPNG
  • Add the compressed image to your drawable folder
  • Right click on file, select ‘Convert o WebP’

This whole process, on an average compresses the image by almost 80-90%. The images do NOT lose any quality at all, and your UI is still snappy and responsive to load and use.

Let’s check an example:

Example to Reduce APK Size

Here’s an example of an image in Snap Search, highlighting one of the premium features ( there are quite a few ):

Premium banner Snap Search original

The above image is the original image and has a size of 115.3KB and its original dimensions are 986×320.

Now, I’m going to upload the same image to TinyPNG and compress it there.

TinyPNG compress image
Premium banner Snap Search compressed

Post the conversion, its new size is 37.1KB. Check out the screenshot below for a before after details of the images:

Before after details of images

Once you’ve got the new compressed image, go ahead and import it into your drawables folder. Once that’s done, let’s compress it into a WebP image.

Converting images to WebP have their own advantages, it provides lossless conversion with upto 3x smaller file sizes compared to PNG images and supports transparency too.

By doing the above steps for all the images I use in Snap Search, I’ve managed to reduce the APK size from 15.6MB to 6.3MB. The screens also loads faster now. These are just some of the stuff that one has to focus on and can affect the users experience in a huge way. Thanks to this, I can always boast of Snap Search being such a small download compared to other browsers even though it definitely has way more features compared to them.

I hope you found it useful ????

Leave a Reply

Your email address will not be published. Required fields are marked *