Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x]: Grapqhl error with @transform "webp" on .svg file #11122

Closed
stephanedemotte opened this issue May 6, 2022 · 2 comments
Closed

[3.x]: Grapqhl error with @transform "webp" on .svg file #11122

stephanedemotte opened this issue May 6, 2022 · 2 comments

Comments

@stephanedemotte
Copy link

What happened?

Graphql crash when we try to transform to webp an SVG.

Screen Shot 2022-05-06 at 6 31 19 AM

Craft CMS version

3.7.41

PHP version

8.1.4

Operating system and version

Ubuntu

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

brandonkelly added a commit that referenced this issue May 7, 2022
@brandonkelly
Copy link
Member

Thanks for reporting that. Fixed for the next release.

Although it is worth noting that each of your @transform directives will be applied separately to the asset. The first one will create a rasterized webp file with a max size of 1000×1000px, since no width or height is specified. The second one will give you the url of an unmodified SVG image, since no format is specified.

If you want a webp image with a 100px width, you will need to combine the parameters into a single @transform directive.

@brandonkelly
Copy link
Member

3.7.42 is out now with that bugfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants