Q: Hide products without images (CE 1.9) This question has been asked multiple times, but none of them have a clear solution and those few cases who should work (according to authors) are definitely not working properly in the current version of Magento, at least for us.
I have setup the following code based on various snippets from overflow and magento stackexchange:
require_once('app/Mage.php');

Mage::app('default');
Mage::app ()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('image', array('neq' => 'no_selection'));

$i = 0;
foreach($products as $product)
{
    echo  $i++.": ".$product->getSku() . " has no image \n<br />\n";
}

When I run this on Magento CE 1.9 on a large shop with thousands of configurable products, I get way more products than it should. The code presents me with a list of way over 1k products, a lot of them with working products with images (products without images should be less than half that figure).
Plus, I picked some random products from which I knew that they had no images and searched for their SKU in the result list from above's code: I couldn't find any of them.
tl/dr: this list is some product listing, but there is no easily discernable connection between the list and "products without images".
I am quite new to all this collection business and Magento in general.
What is the definite indicator of a product which clearly says: "I have no image"?
How would one need to change the code above to properly work with current iterations of Magento CE?
--- UPDATE ---
The following code provides me with a readable list of all products without images, but I can't use this code on the page to hide products without images. How can I translate this into an extended filter?
$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('type_id',array('eq'=>'configurable'));

$i = 1;
foreach($products as $product)
{
    if ($product->getImage() == NULL) {
        echo $i++.": ".$product->getSKU(). " - ".$product->getName()." has no image!<br />";
        echo "<hr />";
    }
}

A filter including all of this should probably look something like this:
However, this does not work. This simply generates me a list of all configurable products WITH images. I tried inversing the image-attribute related filters, but to no avail. The list does not change. What did I miss regarding the filters?
$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter(array(
    array (
        'attribute' => 'type_id',
        'eq' => 'configurable'
    ),
    array (
        'attribute' => 'image', // null fields
        'null' => true
    ),
    array (
        'attribute' => 'image', // empty, but not null
        'eq' => ''
    ),
    array (
        'attribute' => 'image',
        'like' => 'no_selection'
    )
));


A: You have to check both "no_selection" and "NULL", like
WHERE IFNULL(small_image, "no_selection")="no_selection" 
So the condition the image is NULL you have "no_selection" and if it is equal to "no_selection"
The code:
...
$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('image', array('neq' => 'no_selection'));

$select = $products->getSelect();
$select->where(new Zend_Db_Expr('IFNULL(small_image, "no_selection")="no_selection"'));

....

A: I got this working. Mine was version 1.8.0.1. I did these:
1.Added:
$collection->addAttributeToFilter('small_image', array('neq' => "no_selection"));

to line # 157 in /app/code/core/Mage/Catalog/Block/Product/List.php(For paging to reflect the filtering) and copied it to Folder: /app/code/local/Mage/Catalog/Block/Product/(local changes)
2.Then Admin > Configuration > Catalog > Frontend > Use Flat Catalog Product to "No"
Since this filtering is not compatible with the use of "Flat Catalog Product"
Update: I have to make a couple of edits to reflect the count of products in the advanced search and search pages. (However I believe this step is dirty but works.)
Edited:
$size = $this->getSearchModel()->getProductCollection()->getSize();

to 
$size = $this->getSearchModel()->getProductCollection()->addAttributeToFilter('small_image', array('neq' => "no_selection"))->getSize();

on line #90(function "getResultCount") in app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php (For advanced search results count to reflect the filtering) and copied it to Folder: /app/code/local/Mage/CatalogSearch/Block/Advanced/(local changes)
AND
Edited:
$size = $this->_getProductCollection()->getSize();

to 
$size = $this->_getProductCollection()->addAttributeToFilter('small_image', array('neq' => "no_selection"))->getSize();

on line #186(function "getResultCount") in app/code/core/Mage/CatalogSearch/Block/Result.php (For search results count to reflect the filtering) and copied it to Folder: /app/code/local/Mage/CatalogSearch/Block/(local changes)

A: This is a more correct answer. This can be done using Magento events. I added an observer for the event: 
catalog_product_collection_load_before
which adds a filter to remove all the products without images when loading product collection. The observer is as follows: 
public function filterProductsWithoutImages($observer) {
    if (isset($observer['collection'])) {
        $collection = $observer['collection'];
        $collection->addAttributeToFilter('small_image', array('neq' => "no_selection"));
        return $this;
    }
}

Here also we need to disable "Use Flat Catalog Product". For that:
Admin > Configuration > Catalog > Frontend > Use Flat Catalog Product to "No"
Since this filtering is not compatible with the use of "Flat Catalog Product"
Product counts in search pages work fine with this.
