soruly / trace.moe-api

API server for serving backend requests for trace.moe
https://soruly.github.io/trace.moe-api/
MIT License
123 stars 12 forks source link

Switching to webp for preview thumbnails #372

Open Vankerkom opened 3 weeks ago

Vankerkom commented 3 weeks ago

WebP is baseline since 2020, it reduces bandwidth by 25% compared to jpg.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.91%. Comparing base (7238941) to head (82727f5).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #372 +/- ## ======================================= Coverage 92.91% 92.91% ======================================= Files 14 14 Lines 1185 1185 Branches 228 228 ======================================= Hits 1101 1101 Misses 83 83 Partials 1 1 ``` | [Flag](https://app.codecov.io/gh/soruly/trace.moe-api/pull/372/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%E3%82%BD%E7%91%A0%E7%92%83%28soruly%29) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/soruly/trace.moe-api/pull/372/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%E3%82%BD%E7%91%A0%E7%92%83%28soruly%29) | `92.91% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%E3%82%BD%E7%91%A0%E7%92%83%28soruly%29#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

soruly commented 3 weeks ago

Not all API users are using it on web browsers, they may be using it on native apps, or with 3rd party services like chat bots which has unknown media format support. So jpg is not a format I'd like to drop. webp is good, but supporting more than one media format makes things complicated. This is also true for video preview.