• Hello,

    I have observed that the alt attribute in the img tag for the avatar is always the full name of the user, even if a different alt tag was specifically configured in the Media Library. I think the alt tag from the Media Library setting should override the first and last name.

    This is actually a problem for us because we don’t want website visitors to know the last names of our bloggers.

    https://wordpress.org/plugins/wp-user-avatar/

Viewing 2 replies - 1 through 2 (of 2 total)
  • +1
    You need to change.
    wp-user-avatar/includes/class-wp-user-avatar-functions.php : line 358
    $alt = $user->display_name;
    to
    $alt = $alt ? $alt : $user->display_name;
    And line 338
    $alt = $id_or_email->comment_author;
    to
    $alt = $alt ? $alt : $user->comment_author;

    Hope this will be fixed in next release.

    Thread Starter boca jo

    (@boca-jo)

    Thank you TrillipuT! I noticed a filter hook in class-wp-user-avatar-functions.php, so I wrote a filter to change the alt tag. At least that will let me freely apply future updates to the plugin.

    I also hope it will be fixed in the next release. It looks like this plugin is no longer maintained by Bangbay Silobian. She was so great about keeping it updated. I hope Flipper Code does the same.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘alt attribute not obeying setting in media library’ is closed to new replies.