Using webp/avif image transformation in posts?

Hi!

I’m aware that with themes it is possible to use the {{img_url}} helper to output avif-formatted images, as well as the ability to adjust lazy-loading and all of that for the stuff that is included in themes, and that lazy-loading is on by default for images in posts themselves.

However, is it possible to automatically adjust the format that post images output as in a similar vain? For example have them output in avif or webp instead of the format they were uploaded in?

Thank you!