Code for get SKUs which is not have image

Some products have not image then find out product sku use following code.

$prdCollection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addAttributeToFilter("visibility", Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);



$mediaApi = Mage::getModel("catalog/product_attribute_media_api");

foreach($prdCollection as $prd)
{

try 
{
$items = Mage::getModel("catalog/product_attribute_media_api")->items($prd->getId());

if(!count($items))
{
echo  $prd->getSku() . '<br/>';
}


}
catch (Exception $exc)
{
echo $exc->getMessage() . " Remove Image <br/>";
}
}

Labels: