I found an issue that caused the CDN url not being correctly added to url()s in css.
The issue is simply that autoptimizeStyles::fixurls removed the protocol (https?) while autoptimizeBase::url_replace_cdn expects it to be present.
It can be solved simply by either not removing the protocol in the first function.
$newurl = str_replace(" ","%20",AUTOPTIMIZE_WP_ROOT_URL.str_replace('//','/',$dir.'/'.$url));
Or by ignoring the protocol in url_replace_cdn.
$url=str_replace( preg_replace('/^http?s:/', '', AUTOPTIMIZE_WP_SITE_URL), preg_replace('/^http?s:/', '', rtrim($this->cdn_url,'/')), $url);
- The topic ‘Issue with CDN’ is closed to new replies.