Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter norbertk

    (@norbertk)

    I was playing around with the source code and it seems as though the HTML wasn’t being correctly rendered (notice the " before the class:

    <img alt='' src='http://0.gravatar.com/avatar/49f4cf24480f4207af5ed35ec10518fc?s=80&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G" class='avatar avatar-80 photo' height='80' width='80' />

    Should be:

    <img alt='' src='http://0.gravatar.com/avatar/49f4cf24480f4207af5ed35ec10518fc?s=80&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G' class='avatar avatar-80 photo' height='80' width='80' />

    Thread Starter norbertk

    (@norbertk)

    I fixed it by explicitly calling the Gravatar logo:

    $avatar = get_avatar( $authorid, 80 );
    
    if(!empty($avatar)){
    	$html .= '<div class="wpautbox-avatar">';
    
    	$grav_url = "http://www.gravatar.com/avatar/" .
    		md5(strtolower($user_email)) . "?d=" . urlencode($default) . "&s=80";
    	$html .= "<img alt='' src='$grav_url' class='avatar avatar-80 photo' height='80' width='80' />";
    
    	$html .= '</div>';
    }
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘profile image hash not correct’ is closed to new replies.