Image CDN intermediate size not showing on front
-
Hello, We have a recurring issue with image urls coming from the media gallery on the front-end of our website. These images have a local URL instead of the CDN url while these images are available with CDN.
This bug appears when there are failed CDN queue files and affects only mid-sized images (large, medium, thumbnail).
The only solution we have found that temporarily corrects this issue is to empty the queue and purge all caches.
So we started looking in the source code of the site first.
Here are the test results when we debug functions like get_the_post_thumbnail_url ().
var_dump (get_the_post_thumbnail_url ());
-> return CDN url
var_dump (get_the_post_thumbnail_url (get_the_ID (), ‘large’));
-> return local url
This site is hosted on an AWS ElasticBeanstalk environment with a load balancer and multiple AWS EC2 instances. We have configured a CDN on W3TC: “Amazon CloudFront over S3”. Images are correctly uploaded to S3 and available through CDN.
We do not understand why certain images are found in the queue and are no longer displayed on the site. Knowing that we would like to avoid having to empty the waiting line every time, do you have a solution for us?
Thanks for your help
- The topic ‘Image CDN intermediate size not showing on front’ is closed to new replies.