WebP is a good middle ground. There are also services (SaaS) that provide encoding based on the browser. I once had a project that needed to support such a service. It was a frechen SaaS called Cloud Image.
1 Like