Getting profile image

Skip to first unread message

Millennial Memelord

Apr 28, 2016, 1:22:13 AM4/28/16
to Steam Condenser
Having some trouble obtaining the profile picture of someone who connects to a server. I'm using this for a gmod loadingurl. I don't know php very well, and there's some stuff I've removed, but you get the gist - it should retrieve and display the user's profile image 30x30px and nick.

<h4> <img border="0" src="<?php $steamUser->getFullAvatarUrl(); ?>" width="30" height="30"/> <?php echo "  " . $nickname; ?> </h4>

I'm not sure what exactly is wrong, the getFullAvatarUrl seems to obtain the correct address, but it doesn't load. If I echo the url it gives me a working image url, 
If I replace the php with this address, the image does load!

I need some guidance, maybe I'm terrible with php, but I don't have a clue why it won't load... if you know what I'm doing wrong it would be a great help for you to tell me, thanks.

Sebastian Staudt

Apr 28, 2016, 1:33:26 AM4/28/16
Looks like you’re simply missing an `echo`:

    <h4> <img border="0" src="<?php echo $steamUser->getFullAvatarUrl(); ?>" width="30" height="30"/> <?php echo " " . $nickname; ?> </h4>

or shorter:

    <h4> <img border="0" src="<?= $steamUser->getFullAvatarUrl(); ?>" width="30" height="30"/> <?= " " . $nickname; ?> </h4>

You received this message because you are subscribed to the Google Groups "Steam Condenser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit
Reply all
Reply to author
0 new messages