unjs / ipx

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

Support source format and use suffix as final format #160

Open Atinux opened 10 months ago

Atinux commented 10 months ago

Describe the feature

My suggestion would be to have the possibility to tell IPX that it should use the suffix as final format and use the sf or source_format to find the source

Ex: /sf_svg/nuxt.png will be translated to /f_png/nuxt.svg

This allow SSG to work since the browser uses the extension as final format.

Additional information