add_filter( 'post_thumbnail_html', 'remove_thumbnail_width_height', 10, 5 );
function remove_thumbnail_width_height( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
global $post;
if(is_amp_endpoint()){
$html = preg_replace( '/(<img)/', "<amp-img", $html );
$html = preg_replace( '/(\/>)/', "></amp-img>", $html );
$html = preg_replace( '/(sizes|srcset)=\"[^\"]+\"\s/', "", $html );
$html = preg_replace( '/(class\=)/', " layout=\"responsive\" $1 ", $html );
}
$artist = [get_the_terms](http://codex.wordpress.org/Function_Reference/get_the_terms)( $post->ID, 'songartist' );
$artist_name = '';
if($artist) $artist_name = ' by ' . esc_html__($artist[0]->name, 'chords');
$title = [get_the_title](http://codex.wordpress.org/Function_Reference/get_the_title)() . $artist_name . ' Guitar Chords & Lyrics';
$alt = [get_the_title](http://codex.wordpress.org/Function_Reference/get_the_title)() . $artist_name . ' Guitar Chords & Lyrics: ' . esc_html__(generate_meta_description($post, true));
$html = preg_replace( '/(alt)=\"[^\"]+\"\s/', "alt=\"" . $alt . "\" " . "title=\"" . $title . "\" ", $html );
return $html;
}