invalid property on background image after setting image automization and CDN

[ad_1]

Avond hesselwellema;
Could be an interference between AO & SPIO, does the problem persist if “next generation image settings” if off in SPIO?

groeten uit België,
frank

Bonsoir Frank,
Dat heeft helaas geen effect. Instelling uitgezet, sitecache geleegd (SPIO team kwam met dezelde tip ;-). Zelfde probleem.
Dit was voorheen nooit een probleem. Heb wel recent een nieuwe caching plug-inn geinstalleerd (Cache Enabler). Ik ga maar eens alle plug-inns deinstalleren en opnieuw activeren. Misschien ook eens wat betaalde versies neerzetten
grt
Hessel

Kleine aanvulling. Kreeg deze terug van ShortPixel team:

Seems like this isn’t a CDN-related problem either. As you can see, the image can get served from our CDN.

On your website, the URL seems broken because it contains an extra quotation mark (") which is not part of the actual URL – which might be the problem here.

Please check with Frank from Autoptimize via their support forum here to see if they’re able to help with this, and let us know if they find anything.

Sincerely,

OK, can you try editing wp-content/plugins/autoptimize/classes/autoptimizeImages.php and on line 1203 change

return trim( str_replace( array( “\r\n”, ‘”’, ‘”’, ‘'’, ”’ ), ”, $tag_in ) );

into

return trim( str_replace( array( “\r\n”, ‘”‘, ‘”’, ‘”’, ‘'’, ”’ ), ”, $tag_in ) );

and test if this solves the problem?

afraid the forum software changes some of the encoded values here so don’t copy/paste the above, but the point is that on that line you need to add '"', in the list, right after "\r\n",

It helped.

I had to perform some steps though:
.1 implement your changes and clear cache etc -> quotes at the end were not removed from the end but extra quotes were added at the beginning(?)
.2 I decided to deactive lazy loading, clear cache etc -> all quotes were removed from url and heropage was visible again (yeah!)
.3 activated lazy loading, clear cache etc. Still a working hero image

This might not make any sense but still worth mentioning Imho
tx for you help!

OK, will make sure this ends up in the next version of AO 🙂

bedankt voor je hulp ook en feel free to leave a review of the plugin and support here! 🙂

frank

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer