Articles on: Magento 2 Pearl Theme User Guide

Declaration of WeltPixel\CategoryPage\Block\Product\ImageBuilder::create() should be compatible with - How To Solve

Sometimes, during code compilation via CLI or even on the storefront, you may encounter warnings like:


Declaration of WeltPixel\CategoryPage\Block\Product\ImageBuilder::create() should be compatible with ...


This guide explains why it happens and how to fix it.



Cause


An incompatibility between the installed WeltPixel extension / Pearl Theme files and your Magento version.



Why this happens


Starting with Magento 2.3.0, our codebase was split into two sets to match Magento platform changes. Each extension (and the Pearl Theme) includes:


  • A set for Magento 2.0.x – 2.2.x
  • A set for Magento 2.3.x


Using the wrong set for your Magento version leads to warnings/errors like the one above.


Two code sets for different Magento versions



Common scenarios that trigger the error


  • You installed the extension/Theme using the 2.0.x–2.2.x files, but your site runs Magento 2.3.x.
  • You upgraded Magento (e.g., 2.2.9 → 2.3.2) but did not update the extension/Theme files.
  • You updated the extension/Theme, but accidentally used the wrong file set (e.g., used 2.3.x files on a 2.2.9 Magento).



Solution


Reinstall the extension or Pearl Theme using the correct file set for your exact Magento version:


  1. Remove all old extension/theme files from your installation (ensure no mixed versions remain).
  2. Upload the correct files that correspond to your Magento version.
  3. Follow the product’s upgrade/update guide to complete the process (including compile, deploy, and cache steps if applicable).
  4. Verify compilation and storefront after the update.


For Pearl Theme specifics, see:

Pearl Theme Upgradehttps://help.weltpixel.com/en/article/how-can-i-upgradeupdate-the-pearl-theme-to-the-latest-version-1jjatt4/


For the Pearl Theme product page (context):

https://www.weltpixel.com/magento-2-theme-pearl



Tip


When planning a Magento core upgrade, always schedule a parallel update of all installed extensions/themes to the versions that explicitly support your new Magento release. This avoids version drift and prevents compatibility warnings like the ImageBuilder::create() signature mismatch.

Updated on: 16/09/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!