Setting the default Facebook image in WordPress with Yoast

Web Hosting

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.

I build and maintain multiple WordPress websites. By using the experience gained from building these sites I help others create and customize their own websites.
Posts created 27

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?)

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top