Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Add a new syntax for srcset #629

Open
lilith opened this issue Mar 26, 2023 · 0 comments
Open

[RFC] Add a new syntax for srcset #629

lilith opened this issue Mar 26, 2023 · 0 comments

Comments

@lilith
Copy link
Member

lilith commented Mar 26, 2023

In srcset attributes, length matters. Short, comma-delimited directives can be valuable
There's probably a better key, but we can add that later

?srcset=webp90,2x,sharp15,480w

  • [0-9]+w and [0-9]+h will set width and height values.
  • crop will set mode=crop, pad will set mode=pad, the default will otherwise be max
  • [0-9.]+x will set zoom=[value]
  • `jpg[0-9][0-9] will use format=jpeg&jpeg.quality=x
  • `webp[0-9][0-9] will use format=webp&webp.quality=x
  • png[0-9][0-9]
  • png
  • webp-lossless,
  • gif
  • sharp[0-9][0-9] will apply f.sharpen=v
lilith added a commit that referenced this issue Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant