unjs / ipx

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

`animated` modifier not being respected when used with `format_webp` #234

Open jameswragg opened 1 month ago

jameswragg commented 1 month ago

Environment

Node v20.12.1

Reproduction

/format_auto,animated/ should negotiate only the image formats that support animation (webp/gif)

Describe the bug

The following code tries to limit the format_auto modifier to image formats that support animation but animated is always falsy https://github.com/unjs/ipx/blob/main/src/server.ts#L183-L186

Additional context

No response

Logs

No response