I’m using the image element within Cornerstone (Pro Theme), and my goal is to disable the WordPress-specific lazyloading feature for two single images that are displayed within the Above the Fold area.
As of now, it is not possible to do that in an adequate way as the attributes only support the wrapper:
I’ve tried to make it work by hooking into the core functions of the pro theme, but the function responsible for that is cs_apply_image_atts doesn’t have a filter.
You’ll find it in /pro/cornerstone/includes/functions/helpers.php:223
To allow that at least from a technical perspective, please add a filter to your two return lines inside of the cs_apply_image_atts() function so we can customize it programmatically.
Please turn:
return cs_apply_lazy_loading( cs_apply_alt_text( $atts, $alt, $fallback_alt ), $lazy );
into
return apply_filters( 'cs_apply_image_atts', cs_apply_lazy_loading( cs_apply_alt_text( $atts, $alt, $fallback_alt ), $lazy ) );
