Site icon Hip-Hop Website Design and Development

How one can wrap regular picture tag with determine HTML5 component

That is what i’m making an attempt to attain: —
enter image description here

Code i’m making an attempt in wordpress:-

perform html5_insert_image($html, $id, $caption, $title, $align, $url) {

    $html5 = get_image_tag( $id, $alt,$url, '', $align, $measurement );
    $html5 = "<figure id='post-$id media-$id' class='align-$align'>";
    $html5 .= "<img src='$url' alt='$title' />";
    if ($caption) {
      $html5 .= "<figcaption>$caption</figcaption>";
    }
    $html5 .= "</figure>";
    return $html5;
   }
add_filter( 'image_send_to_editor', 'html5_insert_image', 10, 9 );

subject is right here url is just not getting printed picture supply ,i attempted many code from publish from stack or different supply however not working.

Or can be greatest if anybody may also help with the code what i wished. I imply with first instance.

Theme assist for HTML5 is added theme.