xronos-ch / xronos.rails

Ruby on Rails application powering XRONOS, an open infrastructure for chronometric data from archaeological contexts worldwide
https://xronos.ch
MIT License
4 stars 0 forks source link

Serve images in next-gen formats #220

Open joeroe opened 1 year ago

joeroe commented 1 year ago

According to Lighthouse, "Image formats like WebP and AVIF often provide better compression than PNG or JPEG, which means faster downloads and less data consumption"

joeroe commented 1 year ago

I've converted a couple of assets to WebP, but a more sustainable solution to this would be to automatically serve all images in a next-gen if the requesting browser accepts them. There seem to be a few gems that do this.