Posted November 20, 20186 yr Hello IPS, So I'm looking to change something for that's been bothering for quite some time. But I don't know how to go about it. My goal is to replace the Sharer Image that shows by default on Profiles. When you share a profile link to Facebook, Twitter, or any other platform. It automatically uses the Sharer Image instead of the Profile Picture. Is there a way to force it to grab the Profile Picture instead? Maybe some snippet of Code I can add to my theme?
November 20, 20186 yr Community Expert {{if $member->photo}} {{\IPS\Output::i()->metaTags['og:image'] = $member->photo;}} {{endif}} somewhere in the profileHeader template.
November 20, 20186 yr Author 27 minutes ago, opentype said: {{if $member->photo}} {{\IPS\Output::i()->metaTags['og:image'] = $member->photo;}} {{endif}} somewhere in the profileHeader template. OK I added it to the ProfileHeader Template. And then I tested it on Discord and Twitter, but nothing right now. How long do you think it will take before it starts showing?
November 20, 20186 yr Community Expert I tested your site. It is working correctly on Facebook for uncached or re-scraped profiles with an image. Twitter is rejecting to create Twitter cards since you have other meta tag errors. That is unrelated to the og:image though. Edited November 20, 20186 yr by opentype
November 21, 20186 yr Note that Facebook has minimum dimension requirements for sharer images, so if any profile image is too small it won't work (or rather, FB likely won't honor the profile image as the sharer image).
Archived
This topic is now archived and is closed to further replies.