I want to add microdata schema.org for image (itemprop=”image”). i have tried add the itemprop in get-the-image.php
before:
/* Add the image attributes to the <img /> element. */
$html = sprintf( '<img src="%s" alt="%s" class="%s"%s />', esc_attr( $this->image_args['src'] ), esc_attr( strip_tags( $image_alt ) ), $class, $width . $height );
after
/* Add the image attributes to the <img /> element. */
$html = sprintf( '<img src="%s" alt="%s" class="%s"%s itemprop="image" />', esc_attr( $this->image_args['src'] ), esc_attr( strip_tags( $image_alt ) ), $class, $width . $height );
but nothing happened, itemprop=”image” doesn’t show up in my <img> tag.
what should i do?