Changing user picture HTML output on user profile How do I customise the HTML output for the user picture on a user profile? I can output it in user-profile.tpl.php with &lt;?php print $user_profile['user_picture']['#markup'];?&gt;. However this still leaves the original user picture output there too. How do I remove this? The answer in Disable displaying user picture in page--user.tpl.php won't work as that deletes $user_profile['user_picture'], which I'm using.

For an example of this, see http://dev.effectivealtruismhub.com/user/tom-ash . The top, left-floated image is the one I've manually output with  &lt;?php print $user_profile['user_picture']['#markup'];?&gt;. But the right floated one is the one that Drupal auto-generates, in the wrong place in the HTML to be positioned right. How can I remove this auto-generated HTML?
Hmmm, it sounds like you likely left the following line of code in user-profile-tpl.php:

&lt;?php print render($user_profile); ?&gt;


Remove the above line of code.

The duplicate image will go away. And so will anything else in the profile.

You'll need to add back each individual item that you actually want via the same method you used to add just the pic, but for other fields in the profile:

&lt;?php print $user_profile['user_picture']['#markup'];?&gt;


If you are using the Panels module, this is trivial to do without touching any code or needing to dive into the $user_profile array.