How do I add a custom HTML attribute to get_avatar?

You can use the get_avatar filter to modify the output of the image tag and add your HTML attribute

return apply_filters( 'get_avatar', $avatar, $id_or_email, $size, $default, $alt );

$avatar : Image tag for the user's avatar.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)