icerockdev / moko-resources

Resources access for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
1.08k stars 121 forks source link

Support to webp #566

Open enoler opened 1 year ago

enoler commented 1 year ago

Hello,

Is it planned to add support to webp images? It is supported on Android and it allows to have the same image quality than png but with a very important reduction in the file size.

avently commented 4 months ago

You can name images as .png and it will work fine on Android. If you need on desktop, additionally include webp lib from here: https://github.com/haraldk/TwelveMonkeys

avently commented 4 months ago

Turns out, debug build in android works but release build fails on lint step because of wrong extension. So it's not an option, unfortunately

MichaelOliveiraBx commented 2 months ago

It is possible to enable it in resource ? with an boolean in gradle setup maybe, because with compose mulitplaform we can read webp image format without problem on each platform ? It is just to enable this extension at the resource ID generation.