WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Fix Broken Twitter Card Images in WordPress

How to Fix Broken Twitter Card Images in WordPress

Last updated on February 1st, 2021 by Editorial Staff
190 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Fix Broken Twitter Card Images in WordPress

Do you want to fix broken Twitter card images in WordPress?

Twitter automatically tries to display a thumbnail image when someone shares a link from your WordPress site. However, sometimes it may show the incorrect thumbnail which makes your website look unprofessional.

In this article, we will show you how to easily fix broken Twitter card images in WordPress.

Fixing broken or missing Twitter card images in WordPress

Why Twitter Card Images are Broken for Some Websites?

Twitter uses Open Graph metadata to look for images when a link is shared. This is similar to how Facebook shows thumbnails when you share a link on a page or group.

WordPress does not support Open Graph meta tags by default. This is why when you share a link on Twitter, it may not always display a Twitter card image.

A link without Twitter card image

Twitter card images help you get user’s attention and encourage them to click on a link. This means more traffic for your website from Twitter.

A link with a large Twitter card image

That being said, let’s take a look at how to easily fix the broken Twitter Card images in WordPress.

Here is a quick overview of the topics we’ll cover in this article. You can jump to the section that interests you or follow the instructions step by step.

  • Fix Broken Twitter Card Images Using All in One SEO
  • Set a Default Twitter Card Image
  • Set a Default Twitter Card Image for Homepage
  • Use a Custom Twitter Card Image for a Post or Page in WordPress
  • Setting Custom Twitter Card Image for Categories & Tags in WordPress
  • Testing / Troubleshooting Twitter Card Images

Fix Broken Twitter Card Images Using All in One SEO for WordPress

First, you need to install and activate the All in One SEO for WordPress plugin. For more details, see our step by step guide on how to install a WordPress plugin.

All in One SEO is the best WordPress SEO plugin on the market. It allows you to easily optimize your WordPress website for search engines and social media platforms including Twitter.

Note: There’s also a free version of All in One SEO that you can use to fix Twitter card images. Pro version comes with more powerful SEO features.

For the sake of this tutorial, we will demonstrate the Pro version because that’s what we use, but instructions are similar for free version too.

Upon activation, you need to visit the strong All in One SEO » General Settings page to enter your license key. You can find this information under your account on the plugin website.

All in One SEO license

All in One SEO gives you complete control of which images to be used with Twitter cards on your website. We’ll walk you through all the steps.

First, you need to add your social media profile URLs. This would associate your website with your Twitter profile.

Simply go to the All in One SEO » Social Networks page and enter your social media profile URLs including Twitter.

Add your social media profile URLs

Set a Default Twitter Card Image

Next, you need to switch to the ‘Twitter’ tab and click the toggle next to the ‘Enable Twitter Card’ option.

Turn on Twitter Card settings in AIOSEO

Below that, you will see the default settings for Twitter cards which would work for most websites, but you can change them as needed.

Particularly, you would want to change the ‘Default Post Image Source’. All in One SEO gives you a bunch of options.

For instance, you can choose the featured image, attached image, first image in content, image from a custom field, post author image, or first available image.

We recommend using the featured image, as most WordPress themes support featured images that are suitable to be used as Twitter card images.

Below that, you’ll find the option to select a default term image source. This image is used when someone shares a URL to a category, tag, or other taxonomy term archive page.

Setting a default term image

You can upload a default image here, or you can upload a custom image for each category or tag (we’ll show you how to do that later).

After selecting the default Twitter Card image source, don’t forget to click on the Save Changes button to store your settings.

Set a Default Twitter Card Image for Homepage

Now let’s take a look at how to set a default Twitter card image for your website’s homepage.

If you are not using a static homepage, then you can set a default Twitter card image directly from All in One SEO » Social Networs page under the Twitter tab.

Add a custom image for your homepage

However, if you are using a custom home page, then you will see the link to edit your homepage.

Edit your homepage to add custom Twitter card image

On the page edit screen, simply scroll down to the ‘AIOSEO Settings’ box below the content editor. From here, you need to switch to the ‘Social’ tab and then select Twitter.

Fixing Twitter card image for your WordPress homepage

Under Twitter settings, you can override the default options and provide a custom Twitter card image to be used specifically for your homepage.

Custom Twitter card image for your WordPress homepage

Simply click on the drop down menu next to ‘Image Source’, and you will see a bunch of options to choose from. You can choose one of the options or select custom image to upload a new image that you would like to use.

Once you are done, don’t forget to update and save your page changes.

Use a Custom Twitter Card Image for Each Post or Page in WordPress

A lot of bloggers like to create custom social media images for different platforms like Facebook, Twitter, Pinterest, and more.

All in One SEO makes it easy to override your default Twitter card image settings and provide a custom image for any post or page.

Simply, edit the post or page and scroll down to the ‘AIOSEO Settings’ box below the content editor. From here, you need to switch to the ‘Social’ tab and then select ‘Twitter’.

Twitter settings for individual posts and pages in WordPress using AIOSEO

Next, you can set custom Twitter open graph data including a custom image used specifically for this article. Simply scroll to the ‘Image source’ section and click on the dropdown menu.

Setting custom Twitter image for post or pages

You can choose from a bunch of options or select ‘Custom Image’ to upload a new Twitter image.

After that, you can just click on the ‘Upload or Select Image’ button to upload an image from your computer, or use one from your WordPress media library.

Once finished, don’t forget to Update or Publish your post / page to save your changes.

Setting Custom Twitter Card Image for Categories & Tags in WordPress

Just like posts and pages, All in One SEO also makes it easier to upload a custom image for individual categories, tags, product categories (if you are using WooCommerce) and other taxonomies.

Simply, go to Posts » Categories page and click on the Edit link below the category where you want to upload a custom Twitter card image.

Edit category

This will take you to the ‘Edit Category’ screen where you need to scroll down to the ‘AIOSEO Settings’ box. From here, switch to the ‘Social’ tab and select ‘Twitter’ under it.

Setting Twitter card image for a WordPress category

Now, you need to scroll down to the Image source section and click on the dropdown menu. You can choose from a bunch of options or select ‘Custom Image’ to upload a new Twitter image.

Adding your custom image to be used as Twitter card for category

After that, you can just click on the ‘Upload or Select Image’ button to upload an image from your computer or use one from your WordPress media library.

Once you are finished, don’t forget to click on the ‘Update’ button to save your changes.

Testing / Troubleshooting Twitter Card Images

Once you have set up Twitter card images, you would want to test them to make sure that they appear correctly when someone shares a link from your WordPress website.

Simply copy the URL of the page or post you want to test and then go to the Twitter Card Validator website. Paste the URL under the Card URL field and click on the ‘Preview card’ button.

Preview and test your Twitter card images

Card validator tool will then fetch the link and show you a preview of how it would look when someone shares it on Twitter.

Troubleshooting Broken Twitter Card Images in WordPress

If you followed the above steps and still can’t see the correct Twitter card image, then you can try these easy tips for troubleshooting.

Clear WordPress Cache

The most likely cause of broken Twitter images is WordPress caching plugins. Even though, you have set the Twitter card image in All in One SEO, your cache plugin may still be showing an outdated version.

To fix this, you need to clear your WordPress cache and then test again using the Twitter Card Validator tool.

Choose Correct Image Sizes

Make sure that the image you have set to use as Twitter card is neither too small or too large. Twitter recommends images to be a minimum of 144 x 144 pixels in size and less than 5MB in filesize.

Tip: You can learn all about social media image sizes in our ultimate social media cheat sheet for WordPress beginners.

We hope this article helped you fix broken Twitter card images in WordPress. You may also want to see our expert pick of the best social media plugins for WordPress, and our ultimate guide on how to increase your blog traffic.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

190 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

Comments

  1. Congratulations, you have the opportunity to be the first commenter on this article.
    Have a question or suggestion? Please leave a comment to start the discussion.

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
Smash Balloon
Smash Balloon
Add Custom Social Media Feeds in WordPress. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
SendinBlue Coupon Code
Sendinblue Coupon
Get Sendinblue, a powerful marketing automation toolkit for small businesses, for FREE.
InMotion Hosting
InMotion Hosting Coupon
Get an exclusive 50% off InMotion hosting plus a free domain.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.