openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
800 stars 275 forks source link

CI: Image optimization #2435

Open M123-dev opened 2 years ago

M123-dev commented 2 years ago

Problem

We got some svg optimization from @lsaudon in #2414.

It would be great if we could automate and expand it beyond svgs only.

My preference would be ImgBot which could also be interesting for other repos as well. Would you have a look at this @teolemon

Part of

monsieurtanuki commented 2 years ago

My 2 cents...

I'm not a big fan of systematic optimization

TL;DR If it is tested, if it does optimize the app, if it's fast to code and easy to maintain, why not.

AshAman999 commented 2 years ago

so far they are not tested (what about goldens test for SVGs?)

Ran test on my fork for IMG bot and all test were passing ,doesn't seem to have any breaker for now to stop it from being implemented in our project https://github.com/AshAman999/smooth-app/pull/1

monsieurtanuki commented 2 years ago

@AshAman999 I'm not sure the Smoothie tests include the correct display of the 233 SVG files (with the flutter limitations regarding SVG display). For PNG I assume we're safer and that flutter displays them correctly.

In addition to optimization, an added value would be to get the original files from the server and to put them in assets/. Cf. #1963.