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
Here is a reduced test case where I'm transforming the SVG asset above:
{% set asset = craft.assets.id(1162).one() %}
{% set thumb = {
mode: 'crop',
width: 100,
height: 100,
} %}
<img src="{{ asset.getUrl(thumb) }}">
Expected behavior
SVG image cropped to 100 x 100 pixels.
Actual behavior
Error message:
This page contains the following errors:
error on line 2 at column 159: Attribute preserveAspectRatio redefined
Below is a rendering of the page up to the first error.
Craft CMS version
Craft Pro 5.6.1
PHP version
8.2.26
Operating system and version
Linux 6.10.14-linuxkit
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
What happened?
Description
Using Craft's image transform to crop an SVG with the
preserveAspectRatio
attribute causes an error.Steps to reproduce
Example SVG that triggers the error:
Here is a reduced test case where I'm transforming the SVG asset above:
Expected behavior
SVG image cropped to 100 x 100 pixels.
Actual behavior
Error message:
Craft CMS version
Craft Pro 5.6.1
PHP version
8.2.26
Operating system and version
Linux 6.10.14-linuxkit
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: