Richard
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersRight, got it. That was exactly the issue. For future reference to anybody who has this same issue. Just add this to your theme functions:
add_filter(“autoptimize_filter_imgopt_lazyload_js”, function ($in) {
return str_replace(get_option(“autoptimize_cdn_url”), AUTOPTIMIZE_WP_SITE_URL, $in);
});Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersOkay so, here’s the scenario and my theory based on your question about lazysizes loading. When I disable LL, the lazysizes disappears. However, with both enabled, whilst it tried to load the file from the S3 bucket, it’s unable to because it doesn’t exist. So my theory is that lazysizes is needed for the CDN and LL to work simultaneously. Because that file is not loaded, it breaks images.
Firstly, I tried the hook you suggested but couldn’t really figure out what code I need to remove the CDN. This is what I tried:
add_filter(“autoptimize_filter_imgopt_lazyload_js”, function ($in) {
var_dump($in);die;
});Could you send me the code I’d need to revert lazysizes to the local version please?
Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersOkay, new update; ignore my previously stated issues. When I have the CDN and lazy loading, that causes the site’s images to break. Is there a solution for this?
Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersAlso another issue breaking the site when the CDN is set, it tries to convert some images which are PNG to SVG? What’s causing that?
- This reply was modified 4 years, 5 months ago by Richard.
Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersTried that, still includes the “special” file, how do we exclude it?
Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersI can’t as it’s on my local environment. However, an example of a file is this: wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js
These are my JS exclusions: wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, mbm-emap/assets/library/slick/slick.min.js, wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js
Even though that exclusion isn’t working, ideally I’d need to be able to exclude everything in wp-content/plugins, which according to your FAQ can be done like wp-content/plugins/* but as I said, that is not working.
Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersI’m pretty sure since without the CDN specified in AO, it works as expected.
- This reply was modified 4 years, 5 months ago by Richard.
Forum: Plugins
In reply to: [Autoptimize] CDN Ignoring Excluded FoldersYes, I tried adding it to the CSS exclusion list to no avail.
Problem with disabling CDN is we really need it. We already had to write a script to upload AO compiled CSS & JS to our S3 bucket.
Is there no way around it other than not using the CDN. There should really be a CDN exclusion list. Don’t suppose any add-ons have this functionality.