Change image.php in cornerstone

Hello,

Is there a possibility to change image.php file from the cornerstone plugin by moving it to the child theme?

Or is there a filter to add a specific class of a particular image tag?

I’m using WP Rocket plugin and I need to add a class on the image to prevent it from lazy load, but when I add a class through Cornerstone it adds it to the parent span element.

Thank you

Hi @rocket_team,

Unfortunately, it is not possible to modify the core files. Alternatively, you can go through the following thread, which describes how the Lazy Loading is enabled.

And then you can check the following link, on how you can disable it.

Please note that the code provided in the example URLs serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes, which means we can’t fix it in case it conflicts with something on your site, nor will we enhance it. Further customization should be directed to a third-party developer, or you can avail of One, where we answer the questions beyond normal theme support.

Thanks

Thanks for the replay,

I’m not using the WP native lazy load, but WP rocket image lazy load, unfortunately, WP rocket lazy load for specific images can be turned off only if you add a class or image name in WP rocket for the specific image, but we have more than one image to add for every image separately.

Unfortunately, when I add class in Cornerstone Builder it adds class on the span element, not on the image itself.

Is there any way for me to add class on a specific image directly on the image tag, not the span element that is around that image?

Thanks

Hi @rocket_team,

Unfortunately, that is not possible.

Thanks