Adding the Title Tag to Image in Elementor
By Aj Khandal | Published: | 1 min read
Adding the title tag in the Elementor image box widget is not available in the default Elementor plugin. For SEO of any website, we need to add a title to the image. Here is a solution you can follow to enable the title attribute on images for your web pages.
Step 1: Log in to your cPanel or FTP
Step 2: Open the Elementor image size file
Navigate to the following path and open the file:
/wp-content/plugins/elementor/includes/controls/groups/image-size.php
Step 3: Add the title attribute at line 98
Add this line:
'title' => trim( Control_Media::get_image_title( $image ) ),
So the final block looks like this:
$image_attr = [
'class' => trim( $image_class ),
'title' => trim( Control_Media::get_image_title( $image ) ), //*** add this line
];