We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to change user avatar in the meta og:image and itemprop | Forum

nobody
nobody Aug 20 '15

<meta itemprop="image" content="http://example.com/...tar_5_1440089804.jpg" />


<meta property="og:image" content="http://example.com/...tar_5_1440089804.jpg" />


How to change user avatar in the meta og:image and itemprop with the bigger/original avatar by default. its because when i share the user page to FB, the og image content shows the small crop avatar image (avatar_5_1440089804.jpg) rather than the bigger size one.


Anyone know how to change the user page meta (og:image) by default to bigger or orginal type of file user avatar ? as far i know there are 3 files/ types of avatar, 1) small cropped size 2) bigger cropped size and 3) original size.


Pls help. thanks.

Taissa Team
Taissa Aug 21 '15
Topic was moved from General Questions.
Guna
Guna Aug 22 '15


$avatarService = BOL_AvatarService::getInstance();

$avatar = $avatarService->getAvatarUrl($userId, 3);


$avatarService->getAvatarUrl($userId, 3)

The above code will give you the avatar image with full size avatar image.
Check where og:image is defined and change the code.

nobody
nobody Aug 22 '15
Tks , Guna, where should I put the code ? which file ? 
nobody
nobody Aug 23 '15
can anyone help me solve my question pls ? or TEAM maybe ? 
Guna
Guna Aug 24 '15
Provide your site link
Oxwall Tips
Oxwall Tips Aug 25 '15
nobody, is this happening when you share link to user profile?

If you are sharing genera site page ( ex. index) it is much easier to show custom general image of better quality.