When using the transform directive in a GraphQL query, transforms are still generated for GIFs even when transformGifs: false is set in config/general.php.
The directive uses Craft::$app->getAssets()->getAssetUrl() which doesn't seem to check transformGifs, unlike the getUrl method on craft\elements\asset.
transformGifs: false in config/general.php{
asset(id: "1") {
... on assets_Asset {
url
resized: url @transform(handle: "myTransform")
}
}
}
// Expected
{
"data": {
"asset": {
"url": "https://site.com/assets/image.gif",
"resized": "https://site.com/assets/image.gif"
}
}
}
// Actual
{
"data": {
"asset": {
"url": "https://site.com/assets/image.gif",
"resized": "https://site.com/assets/_myTransform/image.gif"
}
}
}
Just fixed this for the next 3.4 release.
Thanks for reporting!
Craft 3.4.29 is out now with that fix.