Setting the default Facebook image in WordPress with Yoast

Sharing posts from WordPress to Facebook is pretty easy. There are dozens of social sharing plugins that make the process quick and painless.

Sometimes the image used when sharing a post can cause problems though.

When you share a post from WordPress that has a featured image Facebook uses that as the image for its post. However, what happens when the post doesn’t have an image?

If there is no featured image or the post doesn’t have any images, Facebook will try to use your website’s logo or header image if you have one. This usually looks pretty bad.

Logos and header images are not meant to be used as an image for sharing on Facebook so they can become stretched or blown up when shared.

Facebook sharing image cut off
The website header image was used when sharing this post and the sides are cut off.

A more extreme example below shows a header image that was used when the post was shared to Facebook. Only a small section of the image is used and it looks pretty bad.

Facebook sharing image blown up
The website header image was blown up when this post was shared on Facebook.

Ideally you want a post like the example below. A custom image that will be used when a post or page contains no images.

No more ugly stretched images on your Facebook posts.

Facebook sharing custom image
A custom image used for sharing on Facebook when a post has no images.

To fix this problem you need to create a default image to be used when posts have no image. The default image will be used instead of your logo or header image.

Create the custom image with Photoshop or an online tool like Canva for your default image. The image should be at least 1200 x 630 pixels.

Setting the default Facebook image

The Yoast SEO plugin makes it super easy to set a custom image to use when sharing posts to Facebook.

After installing and activating the plugin go to SEO then Social within your admin dashboard. Click the Facebook tab and scroll down to Default Settings. Upload or select your custom image from the media gallery.

Yoast SEO social settings
Yoast default Facebook image

Now that image will be used any time a post without images is shared to Facebook.

Override images on specific posts

Yoast can also be used to override the Facebook image on a per post basis. This is useful if you don’t want to use the featured image or default image.

In the WordPress post editor scroll to the bottom of the page and find the Yoast SEO section. Click the social icon, find the Facebook Image section, and upload an image or select one from the media gallery. From here the post title and description can also be overridden.

Yoast post snippet preview
Yoast Facebook image override
Override Facebook title, description and image when the post is shared.

Now you no longer have to worry about images becoming cut off or blown up when posts from WordPress are shared to Facebook.

2 thoughts on “Setting the default Facebook image in WordPress with Yoast”

  1. Is it possible to have more than one image override at a time so that Facebook gives you the choice of which to post? (Much like it does when there are multiple images on the page without the override?)

    • Hi Chris,
      Not that I’m aware of. From what I could find Yoast only lets you choose one override image.

Comments are closed.

Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0