Has anyone considered implementing client hints in Caddy? Leaner Responsive Images With Client Hints — Smashing Magazine
Would this require a plugin? Is this something you could configure yourself with some JSON/Caddyfile voodoo? Or is Caddy poorly suited for using Client Hints?
Basically I’ve been researching how to serve responsive images.
I successfully followed the instructions at Automatically serve webp if browser supports it resulting in this Caddyfile to get Caddy v1 rewriting jpegs/pngs to webp (still need to figure out how to convert that Caddyfile to v2, but shouldn’t be too hard).
More complex stuff, such as supporting multiple image formats like jpeg2000, appears to require using the picture element in HTML, since it seems it’s not possible to have multiple rewrites in Caddy v1? (What about v2?) But I hate having to write out all of this markup, it would be nice to do it server side. So I’d like to use Client Hints somehow, please!