Image API 2.1 introduced a square region argument that is very handy. It would also be nice to able to request an image center-cropped to an arbitrary aspect ratio like 3:2, 16:9, or whatever. This would be convenient for web layouts that need to place images inside uniformly-sized non-square rectangles.
Variation(s)
(do you know of, or can you imagine, similar use cases?)
Proposed Solutions
Support a region argument in {w}x{h} syntax. Example: /identifier/3x2/scale/rotation/quality.format
square would then map to 1x1, so could be removed, or not.
Additional Background
The use case I have in mind is to be able to support a grid of n equally-sized thumbnail images cropped to a given aspect ratio, without having to first retrieve the info.json of all n images and compute the regions client-side. Imagine this page with 3:2 images instead of 1:1 images.
Description
Image API 2.1 introduced a
square
region argument that is very handy. It would also be nice to able to request an image center-cropped to an arbitrary aspect ratio like 3:2, 16:9, or whatever. This would be convenient for web layouts that need to place images inside uniformly-sized non-square rectangles.Variation(s)
(do you know of, or can you imagine, similar use cases?)
Proposed Solutions
Support a region argument in
{w}x{h}
syntax. Example:/identifier/3x2/scale/rotation/quality.format
square
would then map to1x1
, so could be removed, or not.Additional Background
The use case I have in mind is to be able to support a grid of n equally-sized thumbnail images cropped to a given aspect ratio, without having to first retrieve the
info.json
of all n images and compute the regions client-side. Imagine this page with 3:2 images instead of 1:1 images.