No bug CDN and ochRi

More
3 years 3 months ago #1503 by Tim Davis
CDN and ochRi was created by Tim Davis
Hi Ruud,

Thanks for checking out the screen video I sent privately about the problem I am having with ochRi and using a CDN. I thought I'd update it here so others can benefit.

The issue is that when using a CDN regardless of the screen resolution and size of image space, the source image being used to fill the space is the smallest version of all.

So 1920px, 1095px, 800px wide spaces (for example) are using the 480px wide image and expanding it to fill the space.

I took your advice and looked at the plugin order of the CDN and ochRi and found that the CDN plugin was after them. When I changed it to be before ochRi, ochRi did not work at all - only the actual image on the server was being called.

Does this give you any more ideas?
The topic has been locked.
More
3 years 3 months ago #1504 by Ruud van Lent
Replied by Ruud van Lent on topic CDN and ochRi
Good morning Tim,

ochResponsive images replaces a <img> element with a <img srcset> element. The original image is used to create cached images from in the various sizes: these images are store in /images/ochri (or where you have configured it).

So far so good.

What the cdn plugin does (or should do) is copy the local images on your site to the cdn location and replace all references to these images with the 'remote' ones.
There can be two issues:
1. the image location for the images that need to be copied should be configured in the cdn plugin
2. the cdn should not change anything image / srcset related but only the image location

the first you can check in the configuration: are the ochri (cached) images actually copied over to the cdn?

the second you can check if you add manually a img srcset, disable ochri and see if that img srcset display okay with the cdn enabled.

ochResponsiveimages doesn't do anything after it has run. So it will not do anything when the CDN has run as that is configured to run after ochResponsiveImages has finished.

is that something you can check?
Maybe also reach out to Peter(Regular Labs)?
The topic has been locked.
More
3 years 3 months ago #1517 by Tim Davis
Replied by Tim Davis on topic CDN and ochRi
Hi Ruud,

To follow up on this, after finding that changing the order of the plugins and putting Regular Labs CDN before ochRi prevented ochRi form even working, I tested another plugin that handles CDN - JCHoptimize.

Everything worked using JCHoptimize and because I was already using it for other things I figured I would just stick with it because that means one less plugin firing.

Thanks.
The topic has been locked.
More
3 years 3 months ago #1520 by Ruud van Lent
Replied by Ruud van Lent on topic CDN and ochRi
Hi Tim,

to get some 'closure' on this: so it was RegularLabs CDN plugin that was causing the issue and you have now disabled / removed that plugin? correct?
The topic has been locked.
More
3 years 3 months ago #1523 by Tim Davis
Replied by Tim Davis on topic CDN and ochRi
Yes, I believe so.

However, I didn't report this to Peter as I'm a little light on troubleshooting time these days.

Tim
The topic has been locked.
More
3 years 3 months ago #1524 by Ruud van Lent
Replied by Ruud van Lent on topic CDN and ochRi
Okay, thanks for the followup Tim.

I think Peter should be informed somehow: as a developer you always make sure that your extension plays nice with others and this is valuable information for improvement! A extension is always part of a dynamic eco-system, impossible to test all combinations.

closing this one here.
if you have any other questions or concerns / issue please feel free to open a new topic!
The topic has been locked.