How do I add a \'media_gallery\" attribute type to products flat table, so that it can be used in product listing?
To change it programmatically, you could do.
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->updateAttribute('catalog_product', '{field_code_here}', 'used_in_product_listing', 1);
Then reindex.
They can be added by defining "Used in Product Listing" to Yes Once you have done this, you will need to re-index the Product Flat
EDIT: See solution for the final answer.
Source: Can I add other attributes to magento's flat product catalog table?
Solution: Media Images not available in Magento’s product list? Media Images not available in Magento’s product list? - archive