I’ve noticed that Smush cannot detect excluded classes when image attributes are written with single quotes.
I.e. I have added the class ‘.mega-menu-logo’ to be excluded.
The website did use following img-tag:
< img class='mega-menu-logo' src='mylogo.png' />
After Smush processed that image, the output is:
< img src="image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
Smush does not detect single quotes in attributes.
The bug is in file wp-smush-pro/core/moduless/helpers/class-parser.php
The function “get_attribute()” has a bug in the regex.
My suggestion is this Regex:
(when using my suggestion, please remember to also change $value to $value in the line after the regex)
I hope this helps :slight_smile: