ATF optimization and lazyload exclusion is not always applied when using a CDN
Context Take-away from the exploratory testing (Slack) and reports. Applying a CDN changes the URL of images, preventing us from matching them correctly between what we store in the DB and when processing the HTML in WP Rocket plugin.
As a result: the fetchpriority might not be applied to the image tag, and the image tag might still be lazyloaded.
There are several scenarios that can create the issue:
- If the CDN is applied through WP Rocket, then SaaS visits don't see it so pages optimized with SaaS visit won't get the ATf optimization correctly (it might depend on absolute vs relative URLs)
- If the CDN is applied with a 3rd party plugin, depending on when the re-write occur in the order of execution of WP callbacks, we could have CDN URLs in the DB but the WP Rocket plugin would work on HTML that is not rewritten with CDN URLs, hence no match.
Expected behavior TBD
Acceptance Criteria TBD
Additional information TBD
Maybe just strip the domain and search for the asset's relative path for a partial match when optimizing ATF?
Do you have a roadmap to solve this issue? It has a significant impact on performance. Everyone is using a CDN, so it is insane not to have this feature available for a plugin like WP Rocket. Thanks for your clarification about a reasonable timeline.
Another case: https://secure.helpscout.net/conversation/2874120688/545619