Setting Custom Social Media Images with Yoast

Setting Custom Social Media Images with Yoast

WordPress usually does a good job of selecting the correct image from your posts to share on Facebook, Twitter and LinkedIn. But what if you want to set a default image for your entire site or customize the shared image for a specific post? This is very easy using the free WordPress SEO plugin Yoast.

Setting a Default Social Media Image

It’s always a good idea to set a default social media image for pages that don’t have a set featured image or do have an image that doesn’t get pulled in by social media pages because of placement or size. This default image is usually a high-quality version of your companies logo, but could also be a custom image created for this purpose.

  1. To get started, hover over the SEO item in your sites left-hand navigation and select Social.Step 1: Setting Up Social Media Sharing
  2. Click the Facebook tabStep 2: Setting Up Facebook
  3. Make sure the “Add Open Graph” meta data slider is set to Enabled
  4. Press the Select image button and either upload a new image or select an existing image from your media library
  5. Press the Save changes button
  6. Select the Twitter tab
  7. Make sure that the “Add Twitter card meta data” slider is set to enabled
  8. Press the Save changes button

Setting a Social Media Image for a Specific Page

Sometimes a post or page either doesn’t have a suitable image for social media sharing or you would like to use a different image on social media than what is on the page itself. The Yoast plugin also makes this very easy.

  1. Find the Yoast SEO section of the page or post you are editing. It is generally at the bottom of the page.Step 1: Setting a Default Image
  2. Select the social tabStep 2: Setup Facebook
  3. Press the Select image button and then either upload the custom image you want to use or select an image from your media library.
  4. (Optional) Customize the Facebook post title and description.
  5. Scroll down to the twitter sectionStep 3: Setup Twitter
  6. Press the Select image button and then either upload the custom image you want to use or select an image from your media library.
  7. (Optional) Customize the Twitter post title and description.
  8. Publish or update the page or post you are editing.

Troubleshooting Social Media Share Issues

If after setting your default or custom social media image you still don’t see it when you share to Facebook or Twitter, it is possible the old image may be cached.

Clearing the Facebook Cache

To fix this issue for Facebook, you can use the Facebook Sharing Debugger.

Facebook Sharing Debugger

  1. Enter the URL of the page or post from your site that you just updated in the box at the top of the page.
  2. If the image on the resulting page is not the image you were expecting, hit the scrape again button and Facebook will try again.
  3. If you are still not seeing the correct image, you may need to clear your websites cache (or wait 10-15 minutes and try again).

Clearing the Twitter Cache

Twitter’s Card Validator isn’t quite a robust as Facebook’s, but it does allow you to see what your Twitter card will look like without having to make a post. Again, if it’s not correct you may have to clear your cache or wait for it to expire.

Do you want to discuss a project?

Contact Us Today