Skip to content

[RFC] Add a new syntax for srcset #629

Closed
@lilith

Description

@lilith

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions