/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/
<?php
/**
 * Remove image title attributes to prevent tooltips.
 */
function hello_child_remove_image_title( $content ) {
    // Supprime l'attribut title="" des images
    $content = preg_replace('/<img([^>]+)title="[^"]*"([^>]*)>/i', '<img$1$2>', $content);

    return $content;
}
add_filter( 'the_content', 'hello_child_remove_image_title', 20 );
add_filter( 'post_thumbnail_html', 'hello_child_remove_image_title', 20 );
add_filter( 'wp_get_attachment_image', 'hello_child_remove_image_title', 20 );