cloudinary-community / netlify-plugin-cloudinary

Supercharge images on your Netlify site with Cloudinary!
https://netlify.cloudinary.dev/
MIT License
42 stars 18 forks source link

[Feature] Add support for automatic image scaling with client hints #104

Open gshel opened 11 months ago

gshel commented 11 months ago

Feature Request

Is your feature request related to a problem? Please describe.

I would like to specify a Cloudinary crop mode from my netlify.toml file; the current default value is limit and cannot be changed via netlify.toml.

I would also like to be able to specify "auto" as the value for maxSize.height and/or maxSize.width so that I can scale images automatically using Client Hints.

Describe the solution you'd like

Allowing a string to be used as the value of maxSize.height and maxSize.width would allow users to:

  1. scale image widths automagically
  2. dictate how big the "jumps" between automagic image widths should be, reducing cache misses

Users should be able to specify maxSize.crop to help with optimizing the final aesthetic result of an automatically scaled image on a site.

Describe alternatives you've considered

I haven't considered alternatives, but I'm open to suggestions~