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
I store images without URL in storage and only define a URL for the transforms. In Twig when I call the function asset.getImg('existing_transform') it returns NULL.
Steps to reproduce
Create filesytem "Images" w/o public URL and Base Path @storage/assets/images
Create filesytem "Transforms" with public URL and Base Path @webroot/assets/images
Create Assets Volume "Images" with Asset Filesystem "Images" and Transform Filesystem "Transforms"
Create Image Transforms, e.g. "large"
Add an image to an entry
Call asset.getImg('large') in a Twig template
Expected behavior
Return the image tag with image transformation.
Actual behavior
Returns null
Dirty Quick Fix
In elements/Asset.php line 1195 add the following:
if (!$volume->getFs()->hasUrls && !$transform) {
return null;
}
Craft CMS version
Craft Pro 4.1.4.1
PHP version
8.1.7
Operating system and version
Linux 5.10.104-linuxkit
Database type and version
MySQL 8.0.29
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-35)
Installed plugins and versions
Redactor 3.0.2
The text was updated successfully, but these errors were encountered:
What happened?
Description
I store images without URL in storage and only define a URL for the transforms. In Twig when I call the function
asset.getImg('existing_transform')
it returns NULL.Steps to reproduce
asset.getImg('large')
in a Twig templateExpected behavior
Return the image tag with image transformation.
Actual behavior
Returns
null
Dirty Quick Fix
In
elements/Asset.php
line 1195 add the following:Craft CMS version
Craft Pro 4.1.4.1
PHP version
8.1.7
Operating system and version
Linux 5.10.104-linuxkit
Database type and version
MySQL 8.0.29
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-35)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: