fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

images not loading via cdn

Hi Team

We are facing an issue where product images are not being loaded via cdn. We contacted the cdn provider and caching plugin provider and we go the below response from them. It seems an issue with swatches. Could you please guide us here toward resolution? Screenshots are attached below.

Regarding the images that are not being loaded from the CDN, they are being loaded from JavaScript.

If you check, WP Rocket is in fact replacing the URL, and you can see the CDN one, but there is a script that it seems injecting the non-cdn URLs, please check: https://prnt.sc/trCdH8k3oGH-

WP Rocket won’t check scripts to replace image URLs there.

Screenshot 2023-06-04 at 4.39.59 PM.png

 

Screenshot 2023-06-07 at 3.35.08 PM.png

Hakik Zaman

Hi Akshay,

Thanks for reaching out to us. Do you have a staging site with the same setup?

If so, I would request you give admin access to that staging site.

So that, we can test it further. Could you record me reproducing your issue using a tool like this? https://www.useloom.com
It helps me to quickly figure out the issue. Also, I can send this to our development team for further checking.

Thank You

Hi Hakik

This will not replicate on staging credentials as the I am using the cdn on live website only.

Here is what the problem is
https://aweri.in/product/all-in-one-dates-barfi-combo/

As per bunny cdn and wprocket team
A lot of images are not being allowed to be rewritten for the cdn as the swatches variation is not allowing it to.

Please see screenshot below, you will notice that a lot of iamges are still being served by the origin server.

Hakik Zaman

Hi Akshay,

We need a site where the development team can test it further.

Without inspecting it is difficult to find a solution. We don’t want to ruin your production site.

Unfortunately, the screenshots were not attached properly.

You can upload your screenshot here: https://paste.pics/ and post the screenshot link on this thread.

Thank You

Hakik Zaman

Hi Akshay,

Unfortunately, the credentials are not working from my end: https://paste.pics/OGPWR

Please record me reproducing your issue using a tool like this: https://www.useloom.com
It helps the development team to quickly figure out the issue.

Thank You

Hi Hakik

Please use the below as password

G7ubR30hr$b(3RiQtH5l2@So

Hakik Zaman

Hi Akshay,

The images are not loading via CDN even without our plugin. I have deactivated our plugin for a test. Then I inspected the image source and it is still coming from your site not from CDN: https://paste.pics/OGQC5.

Please record me reproducing your issue using a tool like this: https://www.useloom.com
It helps me to quickly figure out the issue.

Thank You

Like I said before. CDN is applicable only on the live website.

Hi Hakik

That’s what I have been telling you from the beginning.

The images are being loaded via js file which belongs to the variation swatches plugin. Which is preventing it from being rendered via cdn.

on the staging website, you will not see it because the CDN is not available on staging.

You need to take the live website and inspect the first product image on a web browser.

You can use the “source” & “network” tabs to see where the images are coming from.

That’s how the issue will be replicated, not the way you are doing it.

I hope this helps.

Hakik Zaman

Hi Akshay,

Like I said before it is difficult to inspect without getting access to the environment.

Please enable the CDN for your staging site. Or, provide the live site details for testing.

Thank You