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
On line 664 of craft-imageoptimize/src/services/Optimize.php, command options are concatenated and padded with spaces only if $thisProcessor['commandOptions'] isn't empty. All of the image optimizers except svgo have default command options in the config. If using svgo, it fails because a space is missing between the command and path in the absence of a command option.
For example:
2021-11-12 10:49:52 [-][-][-][profile begin][nystudio107\imageoptimize\services\Optimize::optimizeImage] optimizeImage
2021-11-12 10:49:52 [-][-][-][info][nystudio107\imageoptimize\services\Optimize::executeImageProcessor] /usr/bin/svgo'/app/storage/runtime/temp/7_Text_v1618e9b30d101f3.73745519.svg'
sh: 1: /usr/bin/svgo/app/storage/runtime/temp/7_Text_v1618e9b30d101f3.73745519.svg: not found
Describe the bug
On line 664 of craft-imageoptimize/src/services/Optimize.php, command options are concatenated and padded with spaces only if $thisProcessor['commandOptions'] isn't empty. All of the image optimizers except
svgo
have default command options in the config. If usingsvgo
, it fails because a space is missing between the command and path in the absence of a command option.For example:
To reproduce
Steps to reproduce the behaviour:
Config:
Create an image transform to trigger optimization on an SVG:
Versions
The text was updated successfully, but these errors were encountered: