Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
TimTheMiles Posted November 20, 2018 Posted November 20, 2018 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?
opentype Posted November 20, 2018 Posted November 20, 2018 {{if $member->photo}} {{\IPS\Output::i()->metaTags['og:image'] = $member->photo;}} {{endif}} somewhere in the profileHeader template.
TimTheMiles Posted November 20, 2018 Author Posted November 20, 2018 I'll get it done! Thanks for all the help!
TimTheMiles Posted November 20, 2018 Author Posted November 20, 2018 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?
opentype Posted November 20, 2018 Posted November 20, 2018 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.
bfarber Posted November 21, 2018 Posted November 21, 2018 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).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.