• Hi,

    I use the new gallery function very often on my blog and I noticed that the alt-tags at the thumbnails and the medium sized pictures are empty, although I filled in the form.
    I already tried the gallery cleaner plug-in but it is not solving the problem.

    Does somebody knows a solution?

    Thank you,
    Carsten

Viewing 1 replies (of 1 total)
  • Thread Starter carsten_lin

    (@carsten_lin)

    I just checked the media.php in the includes directory.

    // as per wp_get_attachment_image_src, but returns an <img> tag
    function wp_get_attachment_image($attachment_id, $size='thumbnail', $icon = false) {
    
    	$html = '';
    	$image = wp_get_attachment_image_src($attachment_id, $size, $icon);
    	if ( $image ) {
    		list($src, $width, $height) = $image;
    		$hwstring = image_hwstring($width, $height);
    		if ( is_array($size) )
    			$size = join('x', $size);
    		$html = '<img src="'.attribute_escape($src).'" '.$hwstring.'class="attachment-'.attribute_escape($size).'" alt="'.attribute_escape($alt).'" />';
    
             }
    
    	return $html;
    }

    it seems to be ok, the alt-attribute should be inserted.
    I hope you understand what I mean. Here is a example of my site: http://www.halle-fotos.de/innenstadt/bilder-rund-ums-fahnenmonument-am-hansering/attachment/parkanlage/

Viewing 1 replies (of 1 total)
  • The topic ‘empty alt-tags in galleries’ is closed to new replies.