What's the proper way to use the get_image_tag filter?

I’m attempting to remove the title attribute for post thumbnails (on certain posts), and I assume the get_image_tag filter is the way to do this. However, what I’ve got so far isn’t working. What do I need to change to make this work? My code:

add_filter('get_image_tag', 'image_no_title');
function image_no_title($title) {
    $title = '';
    return $title;

And the relevant function (from wp-includes/media.php):

function get_image_tag($id, $alt, $title, $align, $size='medium') {

    list( $img_src, $width, $height ) = image_downsize($id, $size);
    $hwstring = image_hwstring($width, $height);

    $class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id;
    $class = apply_filters('get_image_tag_class', $class, $id, $align, $size);

    $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" title="' . esc_attr($title).'" '.$hwstring.'class="'.$class.'" />';

    $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );

    return $html;

Solutions Collecting From Web of "What's the proper way to use the get_image_tag filter?"

Filter always affect first argument, rest are there for additional info and not even passed by default.

add_filter('get_image_tag', 'image_no_title', 10, 4);

function image_no_title( $html, $id, $alt, $title ) {

    return str_replace("title=\"{$title}\"", '', $html);

Thanks to Rarst pointing out that I was in the wrong place, I did some more digging and ended up with this:

add_filter('wp_get_attachment_image_attributes', 'wpse_19029_no_image_title');

function wpse_19029_no_image_title ($attr) 
    return $attr;

I had the same issue where I needed to append a class to the existing post image class attribute. My code was correct, as per your example, but couldn’t understand why the class wasn’t updating.

What I did was to reinsert the images from media library into the posts/pages (worked for featured images and custom fields) after the action and filter were ready.

It’s actually quite logical… I realized that the post is stored in the database and then extracted to generate the html for the ‘front-end’ of the site, but no change were being made to the database entry so I couldn’t actually expect any changes to be immediately visible on the site!