Jump to content
garywhitling

Wrong Image showing when pasting link to Facebook Message

Recommended Posts

Hi,

Sometimes we copy and paste the website address like this - https://www.firstchoicemobility.com/freerider-mayfair-mobility-scooter.html - in to a facebook message but for some strange reason the message always displays the VAT Relief image from the checkout page instead of the actual product image.

Any Idea why it's grabbing this image and not the product image?

Regards Gary

 

image001.png

Share this post


Link to post
Share on other sites

According to this conversation on Stack Overflow, your page needs a <link>, and then you need to tell FB to re-fetch the targeted image using a LINT or DEBUG tool.

In the <head> section, add:

<link rel="image_src" href="{$PRODUCT.small}" />

That conversation also mentions using Open Graph tags, but the latest Foundation skin uses only two of the six required, and only if FBOG is true -- which I cannot find where that happens. Your skin may or may not have that code.

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

I use this is element.meta.php to get it to pick up the image I want. Otherwise it picks up the wrong image for me too.

      {if $FBOG}
      <meta property="og:image" content="{$image.source}"> {*  MY VERSION *}
      <meta property="og:image:width" content="600" />
      <meta property="og:url" content="{$VAL_SELF}">
      {/if}

I'm not sure now if I have other code somewhere else that makes this work or not. My product images are 600, and of course your's  could be something different. The wrong image would have to be something besides the right image for this to work.

Edited by Dirty Butter

Share this post


Link to post
Share on other sites

Hi bsmither,

Excellent that worked!

I pasted the code below

<link rel="image_src" href="{$PRODUCT.small}" />

in to the template files

  • main.php
  • main.checkout.php

and that has fixed it, see image below 🙂

Thank again for your help!

Regards Gary

Screen Shot 2018-07-28 at 12.09.48.png

13 minutes ago, Dirty Butter said:

I use this is element.meta.php to get it to pick up the image I want. Otherwise it picks up the wrong image for me too.

      {if $FBOG}
      <meta property="og:image" content="{$image.source}"> {*  MY VERSION *}
      <meta property="og:image:width" content="600" />
      <meta property="og:url" content="{$VAL_SELF}">
      {/if}

 

Hi Dirty Butter,

I used Brian's suggestion above and that worked.

Thank you for taking the time to offer another suggestion 👍

Regards Gary

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×