Closed
Description
Hi,
I would propose to add an option "aspectRatio" to the Image validation component. It could the syntax aspectRatio: 0.5
or aspectRatio: "16:9"
.
The use case is quite obvious: one has images with a fixed aspect ratio (like square images with 200x200), but want to provide the possibility for the user to upload larger images and autoscale them down (without cropping them). The code would look like this:
Entity:
property:
photo:
- Image:
minWidth: 200
minHeight: 200
aspectRatio: "1:1"
Any thoughts?