• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

OrganicWeb

Mailchimp Training & Consulting

  • Home
  • Services
    • Mailchimp Training
    • Mailchimp Consulting
  • Free Tools
    • Mailchimp Tutorials on YouTube
    • Subject Line Generator
    • Marketing Ideas Generator
    • Map Maker for Email
    • WhatsApp Click to Chat Generator
    • Avoid Email Going to Spam
    • Email Link Generator
    • Is Mailchimp Down?
    • Marketing Facts and Stats
  • Content
    • Blog
    • Videos
  • Contact & About
    • Contact
    • About

Solve WordPress AMP ‘Image missing and required’

Solve the missing image error for AMP pages in WordPressMy websites run on WordPress using CloudFlare for security and performance enhancements. Including AMP copies of posts is becoming a necessity for SEO and page load speed reasons. I recently therefore installed and activated the AMP plugin for WordPress.

Today I received an email from Google Search Console stating:

Google systems have detected that some of your AMP pages do not meet our guidelines and will therefore not show in Google Search AMP-related features. The following report provides examples of pages with errors.

Upon further investigation using the Structured Data Testing Tool there was an issue with an image missing. Specifically the warning read Image missing and required.

How to fix the Image missing and required AMP error

What this error was saying was that the page didn’t include a featured image. I’ve published almost a thousand posts on this website with my blogging most recently being about Mailchimp training and help. I haven’t ever included featured images in my posts and to add a featured image to hundreds of posts would be very time consuming.

Fortunately it is very simple to add a default featured image to all posts that don’t include a featured image. It’s important that your image meets the specifications which are:

  • Image must be a minimum of 696px wide.
  • Must be png, gif or jpg filetypes.
  • Must be crawlable and indexable by search engines such as Google.

Follow these steps to include your default image and solve the image missing AMP error (h/t Brad Brown):

  1. Upload your image to your WordPress media library.
  2. Save the following to your WordPress functions.php file (change the ‘url’ and ‘height’ and ‘width’ as necessary)
    add_filter( 'amp_post_template_metadata', 'organicweb_amp_modify_json_metadata', 10, 2 );
    
    function organicweb_amp_modify_json_metadata( $metadata, $post ) {
    if (!array_key_exists('image', $metadata)) {
    $metadata['image'] = array(
    '@type' => 'ImageObject',
    'url' => 'https://example.com//srv/htdocs/wp-content/uploads/2016/10/OrganicWeb-Mailchimp-Experts.png',
    'height' => 300,
    'width' => 700,
    );
    }
    return $metadata;
    }
    

Your posts will now have a default featured image where you haven’t specifically added a featured image. This will satisfy the Google image requirements for WordPress AMP pages.

Found this useful? Please share:

Related

  • The easiest way to add a Mailchimp popup in WordPress
  • How to change permalinks without losing SEO
  • Microsoft Word to WordPress Style Guide

Filed Under: WordPress

Watch Gary in action

Gary frequently adds Mailchimp instructional videos to his YouTube channel. Subscribe to keep updated.

→  Subscribe   ←

How to add an editable attachment to a Mailchimp campaign.

How to add, and send, coupon codes in Mailchimp.

Reader Interactions

Leave a Reply Cancel reply

You are here: Home / WordPress / Solve WordPress AMP ‘Image missing and required’

Primary Sidebar

Mailchimp write about my work

Read on Mailchimp.com

Learn from a Mailchimp Pro Partner

Signup to receive info about Gary's Mailchimp beginner and advanced classes.

Sign up

Gary on Australian National Radio

Changes are coming to the Australian Spam Act

Read Gary's article in SmartCompany

Meet Gary, Mailchimp Expert

Gary is a Mailchimp Expert and Partner. He delivers Mailchimp training and consulting services in Australia, New Zealand and Singapore. Gary presents at Mailchimp events and hosts the first, and only, Australian Mailchimp sponsored event. He is M.B.A. qualified from Henley Business School, U.K.

Contact Gary for your Mailchimp needs

Footer

Customer Rating

Mailchimp Pro Partners

Contact

Contact Gary for all your Mailchimp training, consulting and integration needs.

Contact Gary.

Copyright © 2022 · Sitemap · ABN: 40800872179 · Privacy Policy · Terms of Service