AI Reports

Guides › Products

How to find Magento products without images

Short answer: the product grid can't filter by image. Either export your products and filter the base_image column, or run the query below to list every enabled, visible product with no base image.

A product with no base image shows Magento's grey placeholder on the website, which costs sales. It happens a lot after imports.

In the admin: export and filter

  1. Go to System › Data Transfer › Export.
  2. Choose Entity Type Products, file format CSV, and click Continue.
  3. The file appears in the list at the bottom of the page once your store's cron has run. Download it.
  4. Open it in Excel or Google Sheets and filter: base_image is empty, product_online is 1, and visibility isn't "Not Visible Individually".

That works, but on a big catalogue the export is slow, and you have to repeat it every time.

With one query

Lists enabled products that are visible on their own (so variants of configurable products are skipped) and have no base image at the default scope.

These queries only read data. Run them on a copy of your database if you can, or ask your developer to. If your tables have a prefix (set in app/etc/env.php), add it to each table name.

Magento Open Source

SELECT e.sku, e.type_id AS type, nm.value AS name
FROM catalog_product_entity e
JOIN eav_entity_type t ON t.entity_type_code = 'catalog_product'
JOIN eav_attribute a_img  ON a_img.entity_type_id  = t.entity_type_id AND a_img.attribute_code  = 'image'
JOIN eav_attribute a_name ON a_name.entity_type_id = t.entity_type_id AND a_name.attribute_code = 'name'
JOIN eav_attribute a_st   ON a_st.entity_type_id   = t.entity_type_id AND a_st.attribute_code   = 'status'
JOIN eav_attribute a_vis  ON a_vis.entity_type_id  = t.entity_type_id AND a_vis.attribute_code  = 'visibility'
JOIN catalog_product_entity_int st  ON st.entity_id  = e.entity_id AND st.attribute_id  = a_st.attribute_id  AND st.store_id  = 0 AND st.value = 1
JOIN catalog_product_entity_int vis ON vis.entity_id = e.entity_id AND vis.attribute_id = a_vis.attribute_id AND vis.store_id = 0 AND vis.value IN (2, 3, 4)
LEFT JOIN catalog_product_entity_varchar img ON img.entity_id = e.entity_id AND img.attribute_id = a_img.attribute_id  AND img.store_id = 0
LEFT JOIN catalog_product_entity_varchar nm  ON nm.entity_id  = e.entity_id AND nm.attribute_id  = a_name.attribute_id AND nm.store_id  = 0
WHERE img.value IS NULL OR img.value IN ('', 'no_selection')
ORDER BY e.sku;

Adobe Commerce

On Adobe Commerce, product attributes are stored per version (for scheduled updates) and linked by row_id instead of entity_id. Use this version there:

SELECT e.sku, e.type_id AS type, nm.value AS name
FROM catalog_product_entity e
JOIN eav_entity_type t ON t.entity_type_code = 'catalog_product'
JOIN eav_attribute a_img  ON a_img.entity_type_id  = t.entity_type_id AND a_img.attribute_code  = 'image'
JOIN eav_attribute a_name ON a_name.entity_type_id = t.entity_type_id AND a_name.attribute_code = 'name'
JOIN eav_attribute a_st   ON a_st.entity_type_id   = t.entity_type_id AND a_st.attribute_code   = 'status'
JOIN eav_attribute a_vis  ON a_vis.entity_type_id  = t.entity_type_id AND a_vis.attribute_code  = 'visibility'
JOIN catalog_product_entity_int st  ON st.row_id     = e.row_id AND st.attribute_id  = a_st.attribute_id  AND st.store_id  = 0 AND st.value = 1
JOIN catalog_product_entity_int vis ON vis.row_id    = e.row_id AND vis.attribute_id = a_vis.attribute_id AND vis.store_id = 0 AND vis.value IN (2, 3, 4)
LEFT JOIN catalog_product_entity_varchar img ON img.row_id    = e.row_id AND img.attribute_id = a_img.attribute_id  AND img.store_id = 0
LEFT JOIN catalog_product_entity_varchar nm  ON nm.row_id     = e.row_id AND nm.attribute_id  = a_name.attribute_id AND nm.store_id  = 0
WHERE (img.value IS NULL OR img.value IN ('', 'no_selection'))
  AND e.created_in <= UNIX_TIMESTAMP() AND e.updated_in > UNIX_TIMESTAMP()
ORDER BY e.sku;

no_selection is what Magento stores when an image was removed. The query checks the default scope only; a store view can still have its own image.

More guides

Gaurav Harsh

Gaurav Harsh is a Magento developer who works on large Adobe Commerce stores and builds AI Reports, a Magento extension for asking your store's data questions in plain English. LinkedIn