You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the @transform directive in graphql, using "fit" mode and omitting either the width or height argument, the missing argument is not automatically returned based on the assets aspect ratio. From the craft 3.x docs:
If you leave Width or Height blank, that dimension will be set to whatever maintains the image’s aspect ratio. For example, if you have an image that is 600 by 400 pixels, and you set a transform’s Width to 60, but leave Height blank, the resulting height will be 40.
Steps to reproduce
(0. Configure craft to store assets in S3)
Upload an asset
query the asset through graphql and omit 1 of the width / height arguments, i.e: height @transform(width: 780, mode: "fit")
The query returns a null value for the missing argument
Expected behavior
The query automatically returns a value for the omitted argument, based on the assets aspect ration, as described in the docs.
Actual behavior
The query returns a null value for the omitted argument.
Downgrading to Craft 3.7.51 and clearing all the caches fixed the problem for me
Craft CMS version
3.7.56
PHP version
7.4.13
Operating system and version
Linux 5.10.104-linuxkit
Database type and version
MySQL 8.0.29
Image driver and version
GD 7.4.13
Installed plugins and versions
Amazon S3 1.3.0
Bugsnag 2.1.2
Freeform 3.13.17
Redactor 2.10.10
Redactor custom styles 3.0.4
SEOMatic 3.4.37
Super table 2.7.2
Trigger 0.3.3
The text was updated successfully, but these errors were encountered:
What happened?
Description
When using the
@transform
directive in graphql, using "fit" mode and omitting either thewidth
orheight
argument, the missing argument is not automatically returned based on the assets aspect ratio. From the craft 3.x docs:Steps to reproduce
(0. Configure craft to store assets in S3)
height @transform(width: 780, mode: "fit")
null
value for the missing argumentExpected behavior
The query automatically returns a value for the omitted argument, based on the assets aspect ration, as described in the docs.
Actual behavior
The query returns a null value for the omitted argument.
Downgrading to Craft 3.7.51 and clearing all the caches fixed the problem for me
Craft CMS version
3.7.56
PHP version
7.4.13
Operating system and version
Linux 5.10.104-linuxkit
Database type and version
MySQL 8.0.29
Image driver and version
GD 7.4.13
Installed plugins and versions
The text was updated successfully, but these errors were encountered: