• Services

    IT SERVICES

    solutions for almost every porblems

    Ecommerce Development

    Enterprise Solutions

    Web Development

    Mobile App Development

    Digital Marketing Services

    Quick Links

    To Our Popular Services
  • Hire Developers

    Hire Developers

    OUR ExEPRTISE, YOUR CONTROL

    Hire Mangeto Developers

    Hire Java Developers

    Hire Node Developers

    Hire Shopify Developers

    Hire Android Developers

    Hire Angular Developers

    Hire Shopware Developers

    Hire iOS App Developers

    Hire WordPress Developers

    Hire A full Stack Developer

    Choose a truly all-round developer who is expert in all the stack you require.

  • Case Studies
  • About
  • Blog
  • Contact Us
Fixing Magento 2 Product Schema Markup | Missing “image” field FIX
Updated on 22/10/2024

Fixing Magento 2 Product Schema Markup | Missing “image” field FIX

ecommerce Magento Technical

Magento 2 is one of the most flexible and customizable eCommerce platforms out there, which is one of the reasons we love working with it. It comes packed with tons of features, but like any platform, it has its issues. One of the more frustrating ones is the default schema markup for products.

As of the latest version, Magento 2.4.7, the default product schema implementation is out right bad. It doesn’t pass all the required details to be eligible for rich widgets on the Google search results, such as the Merchant Listing or Product Card. Additionally, the schema is still in microdata format, whereas the modern JSON-LD format is preferred.

Key Issues with Magento's Default Product Schema:

  • Missing Image Data: Magento’s default schema doesn’t include the product image, which makes your product listings ineligible for merchant listing or simpler terms organic product cards result on Google will not show your site.
  • Missing Description: The product description is a recommended property that’s missing from the default schema.
  • Stock Status: Information about whether a product is in stock or not is also missing, affecting eligibility for rich search results.

Proper schema implementation is essential for improved organic search performance. While schema markup itself doesn’t directly boost SEO rankings, the additional context it provides enhances how your product is displayed in search results. This extra visibility increases your click-through rates (CTRs), which indirectly improves page authority and SEO rankings.

In this post, we’ll walk through how to fix these schema issues in Magento by creating a custom module, we will not change the entire schema, but only override the 

Note: These issues persist in the default Magento setups till version 2.4.7, so if you are using any 3rd party theme or SEO extension, or any newer version in future, then this solution might not work for you. If you are facing any troubles following the guide or fixing the schema, feel free to reach out to us.

Step 1: Custom Module Structure

To make the required changes without them being overwritten by future updates, we’ll create a custom module. Here’s the basic structure:

Click here to view and edit & add your code between the textarea tags

Step 2: Layout Configuration

Default.xml

This layout file is used to override the default template that renders product information. We will use it to override the schema to add the missing information.

Click here to view and edit & add your code between the textarea tags

This block points Magento to our custom product view template (`form.phtml`), where we’ll handle the schema markup for the product information.

Step 3: Schema Markup Implementation

In the form.phtml template, we override the structured data to include missing product elements like the image and description. This step resolves the critical schema issues, making your products eligible for merchant listings and organic product cards on Google.

Click here to view and edit & add your code between the textarea tags

Adding Availability (optional)

While this isn’t essential part, we will basically we’ll override the price rendering to include the offer and stock availability details.

Catalog_product_prices.xml

Creating the default layout file to override the default pricing. This code customizes the price rendering, ensuring that Magento correctly uses our custom template for price amounts (`default.phtml`) to display the price information and include it in the schema.

Click here to view and edit & add your code between the textarea tags

default.phtml

Click here to view and edit & add your code between the textarea tags

Checkout Our Magento 2 Extensions

Final Step: Deploy and Test Your Changes

After implementing the custom module, deploy the changes to your Magento store by running the following commands:

Click here to view and edit & add your code between the textarea tags

Once the deployment is complete, test your product schema markup using Google’s Rich Results Testing Tool. Enter the URL of a product page, test a simple and config product, and ensure everything is correctly recognized.

Would you like to share this article?

Share

need assisting with Magento 2 customization?

Feel Free To Contact Our Experts

All Categories

Artificial Intelligence
ChatGPT
Communication
ecommerce
Magento
News and Updates
Technical
UX and Navigation
WhatsApp API

Latest Post

  • Magento 2 Rich Text Schema Setup in JSON-LD: Step-by-Step Guide
  • Fixing Magento 2 Product Schema Markup | Missing “image” field FIX
  • How to Dispatch Custom Events in Magento 2
  • Adding Filters in Magento Admin Grid | Column and Non-Column Component
  • How to add custom styles (Colors and Fonts) to Magento Admin Grid

Related Post

  • Magento 2 Rich Text Schema Setup in JSON-LD: Step-by-Step Guide
  • How to Dispatch Custom Events in Magento 2
  • Adding Filters in Magento Admin Grid | Column and Non-Column Component
  • How to add custom styles (Colors and Fonts) to Magento Admin Grid
  • Introduction to Events and Observers in Magento 2

310 Kuber Avenue, Near Gurudwara Cross Road, Jamnagar – 361008

Plot No 36, Galaxy Park – II, Morkanda Road,
Jamnagar – 361001

Quick Links

  • About
  • Career
  • Case Studies
  • Blog
  • Contact Us
  • Privacy Policy
Icon-facebook Linkedin Google Clutch Logo White

Our Expertise

  • eCommerce Development
  • Web Development Service
  • Enterprise Solutions
  • Mobile App Development
  • Digital Marketing Services

Hire Dedicated Developers

  • Hire Full Stack Developers
  • Hire Certified Magento Developers
  • Hire Top Java Developers
  • Hire Node.JS Developers
  • Hire Angular Developers
  • Hire Android Developers
  • Hire iOS Developers
  • Hire Shopify Developers
  • Hire WordPress Developer
  • Hire Shopware Developers

Copyright @Azguards Technolabs 2025 all Rights Reserved.