Inline CSS with background with URL are not replaced with the shortpixel CDN (even html/css/inline minification activated):
<div class="slide-item" style="background:url('https://myurl.com/wp-content/uploads/sites/3/2023/04/reves.jpg') center center / cover no-repeat;">
Should be
<div class="slide-item" style="background:url('https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img/https://myurl.com/wp-content/uploads/sites/3/2023/04/reves.jpg') center center / cover no-repeat;">
It's working when we use background-image:url('').
Line 766 in autoptimizeImage.php should replaced from:
$out = preg_replace_callback( '/style=(?:"|\')[^<>]*?background*?:\s?url\((?:"|\')?([^"\')]*)(?:"|\')?\)/',
to :
$out = preg_replace_callback( '/style=(?:"|\')[^<>]*?background[-image]*?:\s?url\((?:"|\')?([^"\')]*)(?:"|\')?\)/',
Inline CSS with background with URL are not replaced with the shortpixel CDN (even html/css/inline minification activated):
<div class="slide-item" style="background:url('https://myurl.com/wp-content/uploads/sites/3/2023/04/reves.jpg') center center / cover no-repeat;">Should be
<div class="slide-item" style="background:url('https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img/https://myurl.com/wp-content/uploads/sites/3/2023/04/reves.jpg') center center / cover no-repeat;">It's working when we use background-image:url('').
Line 766 in autoptimizeImage.php should replaced from:
$out = preg_replace_callback( '/style=(?:"|\')[^<>]*?background*?:\s?url\((?:"|\')?([^"\')]*)(?:"|\')?\)/',to :
$out = preg_replace_callback( '/style=(?:"|\')[^<>]*?background[-image]*?:\s?url\((?:"|\')?([^"\')]*)(?:"|\')?\)/',