Simple plugin to add custom CSS class to Elementor image.
As of April 2026, Add class to Elementor Image is a WordPress elementor plugin with 1.0K+ active installations and a 4.8/5 rating from 10 reviews. It has been downloaded 14K+ times in total. Requires WordPress 5.5+ and PHP 7.0+. Available on WordPress.org since 2021. Recently updated within the last 3 months. Download volume is stable this week. Top alternative: Elementor Website Builder – more than….
You need add your custom CSS class to Elementor image widget? Me too!
So i created this simple plugin to help. Just install and use the new input in Image widget to add your custom class.
Check my other plugins: WordPress Plugins
Check my blog: WordPress Tips
Please, send to me: [email protected]
Thanks Eduardo!
The plugin worked perfectly.
I appreciate your contributions for us. Keep it up!
Needed to exclude some images from lazy loading in WP Rocket, but Elementor adds classes to the parent <div>, not the image tag. This plugin solved it instantly. Thanks, Eduardo!
Excelente plugin para adicionar classes de no-lazyload em imagens. Até então a única solução para esse problema no Elementor.
I use SiteGround for my hosting. It’s built in caching plugin has a lazy load setting. Unfortunately this broke a particular grid layout in my design. There is an option to stop lazy loading on and individual basis by adding the class “skip-lazy” to the desired image. This plugin allowed me to do just that.
Was trying to figure out way to add a class only to my featured images in my Elementor layout for blog posts, so I can disable lazyload on them, and this plugin works great. Highly recommend it. That said, I ended up deciding not to use it since I found a Functions.php code snippet that worked for my needs. I prefer to not use additional plugins if I can help it. But if you need more granular control over classes on images and you use Elementor, this plugin is what you need.
But if you just need to do what I did, here’s the snippet that worked for me:
function db_add_class_to_single_featured_image($attr) {
remove_filter('wp_get_attachment_image_attributes','db_add_class_to_single_featured_image');
if ( is_single() ) {
$attr['class'] .= ' no-lazy';
}
return $attr;
}
add_filter('wp_get_attachment_image_attributes','db_add_class_to_single_featured_image'); | WordPress | 5.5+ requiredTested up to 6.9.4 |
| PHP | 7.0+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.