Been having trouble displaying an avatar for my website. I store all of them in a custom folder called images, where either I or the users create them. The avatar shows only if youre the exact id the avatar is named after. Example:
I have a user who's id is 1, I also have an image with a name 1.png, so this PHP code block gets the link where the images are stored at, fetches the users id and then searches the page for that image that is name after the id.
Here's the code block I've been having issues with:
<img id='avatar'
class='Avatar'
src='https:/mysitelink.com/images/' + <?php echo"" . $fetchuser->id . ""; ?>.png?r=<?php echo "$RefreshRate"; ?>'
height='350'
width='350'
onerror="this.src='mysitelink.com/images/default.png'" />
The mysitelink.com is inserted by me to hide the link of the website.