ECommerce Insights Blog

Stay on top of it all and get ahead with useful articles, how-tos, tips and tricks on e-commerce.

Magento Missing Thumbnail Image for Category

The latest Magento version removes the feature of adding thumbnail image for category in Admin Panel. If you are using default Magento sample data, then it will add the category thumbnail attribute. But most of the time store owners do not use ‘Default Magento sample data’ & add their own category & products.

Most of the custom themes will use this feature to display the category thumbnail image in navigation menu. But then this stops the theme displaying the category thumbnail in navigation menu for Magento

To have category thumbnail attribute without sample data in Magento, run the following queries in phpMyAdmin,

INSERT INTO `eav_attribute` (`attribute_id`, `entity_type_id`, `attribute_code`, 
`attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, 
`frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_required`, 
`is_user_defined`, `default_value`, `is_unique`, `note`) VALUES(140, 3, 'thumbnail', NULL, 
 'catalog/category_attribute_backend_image', 'varchar', NULL, NULL, 'image', 'Thumbnail
 Image', NULL, NULL, 0, 0, NULL, 0, NULL);
INSERT INTO `catalog_eav_attribute` (`attribute_id`, `frontend_input_renderer`, 
`is_global`, `is_visible`, `is_searchable`, `is_filterable`, `is_comparable`, 
`is_visible_on_front`, `is_html_allowed_on_front`, `is_used_for_price_rules`, 
`is_filterable_in_search`, `used_in_product_listing`, `used_for_sort_by`, 
`is_configurable`, `apply_to`, `is_visible_in_advanced_search`, `position`, 
`is_wysiwyg_enabled`, `is_used_for_promo_rules`) VALUES 
 (140, NULL, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, 0, 0, 0, 0);
 INSERT INTO `eav_entity_attribute` (`entity_attribute_id`, `entity_type_id`,  
`attribute_set_id`, `attribute_group_id`, `attribute_id`, `sort_order`) 
VALUES (337, 3, 3, 4, 140, 3);

Here, we are using attribute_id as 140, use an ID for this in these queries by a unique value. This should resolve the issue pertaining to the missing thumbnail image for category.