unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
1.53k stars 61 forks source link

fix: animated modifier wasn't correctly being passed to autoDetectFormat #235

Open jameswragg opened 1 month ago

jameswragg commented 1 month ago

Fixes #234

Using animated modifier creates the following modifier key/value which wasn't seen as a truthy value when used in combination with format_auto meaning the format selection wasn't limited to "image/webp", "image/gif":

{
  animated: ''
}
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 56.02%. Comparing base (f666cb4) to head (364d77d). Report is 16 commits behind head on main.

Files Patch % Lines
src/server.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #235 +/- ## ======================================= Coverage 56.02% 56.02% ======================================= Files 14 14 Lines 1203 1203 Branches 83 84 +1 ======================================= Hits 674 674 Misses 526 526 Partials 3 3 ```

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