From the course: Android Development Essential Training: The User Interface with Kotlin

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Reduce file size with WebP images

Reduce file size with WebP images - Android Tutorial

From the course: Android Development Essential Training: The User Interface with Kotlin

Start my 1-month free trial

Reduce file size with WebP images

- [Instructor] Android has good support for older image formats such as JPG and PNG files but it also supports a newer format called WebP. WebP images support all the features of both JPG and PNG files, including transparency, as long as your App is deployed on newer versions of Android. But in applications that have a lot of image files, you can significantly shrink your application package by using the WebP format. Android Studio makes it easy to convert your existing images files to this new format. First, in my Gradle Build file for the App module I'll show that my current minimum Sdk Version is 19. And that will work with WebP files with transparency. The minimum is actually API 18 but I like supporting Android 4.4 KitKat and later. Now I'll go to my drawable directory and I'll right-click on one of my PNG files and I'll choose convert to WebP. On this screen you can set the encoding quality but you can also set an option to preview the converted images before you execute the…

Contents