Add format convertion feature to image processing

I want to use WebP images in my posts (pagespeed, performance, etc) and keep JPEG fallbacks.

For now I do run some handwrited bash script to find all images and convert them.

I think it would be useful to have such feature out of the box.

What do you think about it?

{{ $webp := $resource.Convert "webp" }} 

I would be interested too.
(for now I use the base64 encode function)