Repository navigation
Add support for WebP #9857
Description
Activity
- changed the title
[-]Documentation about image format WebP Image format[/-][+]Documentation about image format WebP/ Gif Image format[/+]on May 6, 2017 Supporting animated GIFs is #204
Adding WebP is just a binary-size trade-off. We should measure how much binary size it costs to evaluate the trade-off.
- changed the title
[-]Documentation about image format WebP/ Gif Image format[/-][+]Add support for WebP[/+]on May 6, 2017 - addedc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
on May 6, 2017 Thanks for considering this feature. Since Flutter is mobile first currently and comparing the size of an animated Gif to an animated webp : http://www.androidpolice.com/2017/05/01/animated-png-format-compare-animated-webp-gif
Size benefits are really huge for animated webp but maybe not that much with still images.
Consideration of the benefits should also include the gain of internet bandwith in highly graphical context not only for application first load size. In my case if Flutter support webp it can also drive my server cost to go much lower.
Thanks for the feedback! We're curious how much our engine size will grow if we add support for WebP. But I personally agree, WebP is a useful format for when load times and bandwidth costs are important.
Since the last few versions of Android Studio, there is an option to convert all your assets to WebP which I'm sure many do to save up room in their apk (as I have).
WebP while not a blocker could be a barrier for someone porting their app over since they have to get all their assets back to png/jpg
In my case app users are generating all the content and I'd like to encode it as webP/webM as the results is 30/40 % gains in the size/cost. Same problem than Google+.
I may not represent the majority of use cases and I understand that engine size is top priority for speed.
It can be totally acceptable for me to have it as an engine plugin in the rendering core that I have to declare somewhere if the architecture permit this.
Thanks you for handling this case ;)
Reacted by Faisal AbidWe intend to support video through our plugin system: #2319, once that's done, presumably it should also be possible to wire up video-like things, possibly even additional image decoders like webp through a similar means. But that will mean the plugin may (or may not) contain a webp decoder, which means your app would contains such, and may negate some of the binary size gains you hope to achieve through webp, not sure.
Thanks Eric, I just want to make clear that the gain is on the server side. If I got several thousands of users uploading medias by encoding to webP/M I'll gain ~30% size/costs compared to storing using jpg, png, etc on many gigs.
It's more than acceptable to paid let's say 5mo in app size and have the codec saves me bandwidth and storage (A LOT). I got those medias by new Image.network not by bundling assets.
I want to also point out that the Android docs recommend using WebP to reduce the size of your APK: https://developer.android.com/topic/performance/reduce-apk-size.html
Reacted by Nami W, Neil Jay Warner and Mirza JaunTo gather data about how much this will increase the size of the engine, we need to:
- Flip this flag: https://github.com/flutter/engine/blob/master/tools/gn#L66
- Drop https://chromium.googlesource.com/webm/libwebp into //third_party/webp
- See how much the minimal app size benchmark regresses.
Reacted by Roger ChapmanThe currently wired up decoders are JPEG, PNG, GIF, ICO, BMP and WBMP.
7 remaining items
- Who uses bmp and ico in mobile dev! Woo! webP will make life easyOn Mon, Nov 13, 2017, 11:38 PM Eric Seidel ***@***.***> wrote: 161k sounds like a very worthwhile tradeoff. As @sethladd <https://github.com/sethladd> notes, we probably could remove some of our other codecs later (unclear how much they'd save) when we look more holistically at binary size. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#9857 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAPfBJUXbfb-U59YZDc4-ADsbKh1PK0mks5s2Rk5gaJpZM4NSioD> .--…Sent from my phoneReacted by Emmanuel Chucks 🇬🇭
Is it worth estimate what we'd save by removing BMP and ICO? (presumably, those could be implemented in Dart code if someone really needed them?)
Thanks @amirh !
Thanks!
Note that this will only be available in master after an engine roll (should happen in the next few hours)
- Nice, I can stop converting the assets to png now and just drag and drop my folder. Thanks everyone!On Thu, Nov 16, 2017, 8:19 PM amirh ***@***.***> wrote: Note that this will only be available in master after an engine roll (should happen in the next few hours) — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#9857 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAPfBIHPAwCbbBzYP668qdlIDg75WF4sks5s3HydgaJpZM4NSioD> .--…Sent from my phone
Engine rolled with WebP support.
The basic material app size benchmark went up by 159k for Android, 184k for iOS.Reacted by Robert Felker, Mark Shipton, Marc Reichelt, Angius, Emmanuel Chucks 🇬🇭, Bruce.Liu, Abhishek Aryan, Eka Cahya Pratama, Flucadetena, Akshay Bhange and 1 moreHow to compare progressive jpeg with webp? Instagram is doing progressive jpeg. In respect of data and processing comparisons.
Webp on Android, added as asset works without any problems. Please clarify, will it work on iOS or not? Official documentation does not say anything about it, it only says webp assets are supported in Flutter. Will iOS be able to display webp asset or not?
Reacted by Jonas Schalck, xioxin and fzyzcjy@giaur500 Do you find the answer?
It seems webp assets work just fine on iOS.
Reacted by fzyzcjyHi, which version of flutter did support the webp format for ios?
thanks.Reacted by Enrique CardonaI wanted to save webp image to gallery on flutter.
but failed.
any solution on it?Reacted by Jonas Schalck, Juan David Parra Pimiento and Diego AmorinThis thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 6, 2021
Hi flutter team,
During my testing phase I discovered that using NetworkImage
Can it be in public documentation and maybe have a follow up ?
In a UI having animated gif and control on the loop is really a great feature,
look at facebook reaction buttons as an example.
WebP because I was expecting to convert all my users upload to this format
but the lack of this feature currently will move the priority. Others may be happy
to read it in the doc.
Regards,