I'm using wp-rocket cache plugin and the Nectar Slider image URL's are not being translated to CDN URL's like all other images through the site.
Below is what they sent me... can you assist me to get this working please ? I can apparently use their function and replace your custom one... not quite sure if that will be a hassle to do or not.
thanks Scott
-----------
Hi Scott I checked with our developer on this issue. The reason those images are not being added to the CDN is because it's not a regular <img> tag (it's a background property within the html), so the image is not detected. If the theme/plugin generating the image was using a standard WordPress function, it would work, but it's a custom function. It would also work if that piece of code was in an external stylesheet rather than inlined in the HTML of the page.
To use this, you would need to know where in the code the function is being called that is generating the slider image, so that you can add our function to it. So I guess you can contact the theme/plugin developer about that, and make the modification in your child theme.
Hi,
I'm using wp-rocket cache plugin and the Nectar Slider image URL's are not being translated to CDN URL's like all other images through the site.
Below is what they sent me... can you assist me to get this working please ? I can apparently use their function and replace your custom one... not quite sure if that will be a hassle to do or not.
thanks Scott
-----------
Hi Scott
I checked with our developer on this issue. The reason those images are not being added to the CDN is because it's not a regular <img> tag (it's a background property within the html), so the image is not detected. If the theme/plugin generating the image was using a standard WordPress function, it would work, but it's a custom function. It would also work if that piece of code was in an external stylesheet rather than inlined in the HTML of the page.
We have a function to add images like this to the CDN:
get_rocket_cdn_url()
To use this, you would need to know where in the code the function is being called that is generating the slider image, so that you can add our function to it.
So I guess you can contact the theme/plugin developer about that, and make the modification in your child theme.
Cheers
sorry the title should be Nectar Slider not compatible with wp-rocket CDN options... I can\'t seem to update it - feel free to change the title.