WordPress.org

Ready to get started?Download WordPress

Forums

no ATL-Tag in medium sized pictures (1 post)

  1. carsten_lin
    Member
    Posted 6 years ago #

    Hi,

    I use the standard gallery function of WP, but the ALT attribute for images becomes not included in the HTML-Code.

    here is a example, the alt-tag is available but empty.

    Here is my code to show the picture in the image.php:

    <p class="attachment">ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?>

    I've already changed the media.php with this code at line 330, but the alt-tag stays empty:

    $html = '<img src="'.attribute_escape($src).'" alt="'.attribute_escape($alt).'" '.$hwstring.'class="attachment-'.attribute_escape($size).'" />';

    Please help me, this problem makes me crazy....

Topic Closed

This topic has been closed to new replies.

About this Topic