Quick Way to Find Products Missing Images in Magento 2
Keeping your product images up to date is important for any online store. Sometimes, during imports or catalog updates, a product might end up without an image. Magento 2 doesn’t show a built-in list of these products, but you can easily find them using a small SQL query.
This query checks the main image fields in Magento (image, small_image, thumbnail) and returns any product that has no value assigned. Once you have the list, you can add images and keep your storefront looking professional and complete.
SELECT
e.sku
FROM catalog_product_entity AS e
LEFT JOIN catalog_product_entity_varchar AS img
ON img.entity_id = e.entity_id
AND img.attribute_id IN (
SELECT attribute_id
FROM eav_attribute
WHERE attribute_code IN ('image', 'small_image', 'thumbnail')
AND entity_type_id = (
SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product'
)
)
AND img.store_id = 0
WHERE (img.value IS NULL OR img.value = 'no_selection' OR img.value = '')
ORDER BY e.entity_id;