-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Short description of the issue
Default Image field with one image with Dimensions of 1200x1400 px (Width x Height). In my template I'm exporting this image in different resolutions to use it as an responsive image but with a fixed aspect ratio of 16:9
$options = ['upscaling' => false];
$image->size(1920, 1080, $options);
$image->size(960, 540, $options);
$image->size(480, 270, $options);
Expected behavior
Images which are to small in dimensions for the target image size should still maintain the expected aspect ratio. The two smaller images can be cropped without problems, the larger image would have to be upscaled to meet the required dimensions (which is disabled). I would expect this image to have dimensions of 1200x675 (crop to maximum possible dimensions without upscaling but still maintain the aspect ratio of 16:9)
Actual behavior
The image just uses the original dimensions as a maximum independently. The image with a target size of 1920x1080 gets cropped to 1200x1080. So I end up with the two smaller images in the correct aspect ratio of 16:9 and with the largest image with a completely arbitrary aspect ratio.
Setup/Environment
- ProcessWire version: 3.0.105