Image when sharing posts

New Member
7 0 0

Hi there,

When I share a link to my site on sites such as Facebook or Instagram, it comes up with a generic image that I presume was with the theme. Where do I go to change this image? Also how do I change it for each link for each product?

 

Many thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
553 36 76

Hi, there. 

Dallas here from the Social Care Team. That is a very good question and I completely understand how frustrating that is for you! Let me help to explain how it works a bit and then I will help you to fix it all up. 

When you make a post to your Facebook page the image, store name, URL, etc. are pulled over to your post. This information is called Open Graph Objects. It is what is pulled through for all social media platforms, not just Facebook. This link here will explain it in greater detail, but I completely understand if that page just looks super overwhelming. It is by no means mandatory to read! I do, however, have this other really helpful link that I also recommend reading through. It also explains the whole process, but it does so in a way that is way easier to digest. 

When it comes to actually fixing the issue, if you follow these steps you should be good: 

 

  • First, you're going to get the link for the image you'd like to display instead. You can find this if you upload the image to Settings > File in your Store Admin. You are then going to need to insert this link into your code. Alas, if the word code makes you sweat do not sweat, I am here to walk you through each step! 
  • Navigate to your theme's liquid (Online store > Themes > Customize Theme > Actions > Edit code.) 
  • Select the theme.liquid, and search for the <head> tag. On the line below that tag you can paste this in:
 <meta property="og:image" content="X" />

Just replace X with the URL of the image you just uploaded to the File section of your Store Admin.

  • Save the theme.liquid, and open up a new tab with Facebook's debugger
  • Enter the home page URL to scrape the page, and wait a few moments for the new image to populate. You may need to scrape the page once more.
  • Once you have finished this please clear your cache. This helpful link gives the instructions for how to clear the cache for all browsers. 

This should solve the issue for you. If it doesn't or if you have any other questions please don't hesitate to let me know. 

Cheers,
Dallas

Dallas | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes