If you’re using Yoast SEO on your WordPress site, you’re already ahead in optimizing your content for search engines. But have you ever noticed that when your articles are shared on social media or appear in rich results, sometimes no image shows up—or the wrong one does? This is where setting a default image for article in Yoast SEO schema becomes essential.
In this blog, we’ll walk you through why and how to set a default image that helps boost your SEO and social sharing performance.
Why Is a Default Image Important?
When your blog post doesn’t contain an image, or the first image is not appropriate for sharing, platforms like Facebook, X (Twitter), and LinkedIn might not display anything at all. This not only affects your visibility but also your click-through rate (CTR).
Similarly, search engines using schema.org’s structured data to generate rich snippets can benefit from a properly set default image, especially for the Article type.
How Yoast Handles Article Schema Images
Yoast SEO automatically generates schema markup for your articles. This includes data like:
-
Article title
-
Description
-
Author
-
Date
-
Featured image (if set)
If no featured image is available, the schema may be incomplete or even omit the image
property—leading to poor previews in rich results.
How to Set a Default Image in Yoast SEO
Here’s a step-by-step guide to make sure there’s always a fallback image:
1. Add a Default Social Image
Navigate to:
Yoast SEO → Settings → General → Site Basics
Under “Site representation,” upload a default social image. This image will be used when a post doesn’t have a featured image.
2. Customize Your Theme’s functions.php
If you want to ensure every article has an image in schema—even when one isn’t set—add this custom code to your theme:
This code ensures that even if no featured image is selected, the schema will include a fallback image.
Recommended Image Size and Format
-
Minimum size: 1200 x 628 px
-
Format: JPG or PNG
-
Ratio: 1.91:1 (ideal for Open Graph and Twitter)
Bonus Tip: Use Open Graph Tags
Yoast also supports Open Graph metadata for Facebook and Twitter Cards. You can set default images here:
Yoast SEO → Settings → Site Features → Social
Make sure the correct default image is set for both platforms. This ensures better control over how your content appears when shared.
Conclusion
A missing image in your schema can cost you in visibility and clicks. Setting a default image for article in Yoast SEO schema is a simple, effective SEO enhancement that ensures your content always looks professional and attractive—whether in Google rich results or on social media.
Take a few minutes to configure this today, and give your content the visual edge it deserves.