• Resolved jaygoldman

    (@jaygoldman)


    Hello!

    Really enjoying this plugin — solved a major issue for me very elegantly.

    One bug report: I’m getting alt=”Array” in my images.

    I’m calling:

    $img = $taxonomy_images_plugin->get_image_html( 'large', $term->term_taxonomy_id );

    and getting back:

    <img src="<url-omitted-but-correct>" alt="Array" title="" width="306" height="172" class="alignnone size-large wp-image-25" />

    Looks like the culprit is line 327 of taxonomy-images.php:

    $alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt' );

    According to the codex page, get_post_meta returns an array unless you specific single=true.

    Changing the line to set single fixes the problem:

    $alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );

    http://wordpress.org/extend/plugins/taxonomy-images/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Fields

    (@mfields)

    Jaygoldman,
    Thanks for taking the time to submit the bug report! I updated the plugin as you suggested and this bug can be considered squashed. Version 0.4.4 and beyond will have the fix.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Taxonomy Images BETA] Bug report and fix: alt property of images’ is closed to new replies.