Open VictorCam opened 1 year ago
Hey @VictorCam thank you for the suggestion, this is being looked at the PR raised by @netolicak. You can follow the progress https://github.com/FatehAK/vite-plugin-image-optimizer/pull/23
Sound good. Thank you!
An extremely necessary option.
I need that)
It could be awesome if the plugin generates various outputs and automatically choose the best file at runtime based on file size and format.
Describe the feature you'd like to request
It would be really great if you could convert an image into a different image formats for production
for example converting a png image into another format available in sharp like webp/avif/etc...
I think this would be great to save people the time when doing the conversion, and to save some additional space.
Describe the solution you'd like
maybe a toFormat option in the config file since that is the name of the method in the sharp package. Where you can specify as a string what format you would like to image to be converted to.
Additional context
https://sharp.pixelplumbing.com/api-output#toformat
Thank You!
Validations