Jump to content

Wrong Image showing when pasting link to Facebook Message


garywhitling

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

Link to comment
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.

Link to comment
Share on other sites

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.

Link to comment
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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...