Our products were imported using Magmi and the swatch images set using the media_gallery field of the Magmi CSV file. After the import completes, the swatch images are seen correctly in the product catalog. When viewing the product in the public site of the site, the swatches are not show. When going back to see the product catalog, the swatch images have disappeared.

If we add the swatch images manually through the product catalog the swatch images remain as expected.

After the import is complete the product looks like this from the admin page:

enter image description here

Then going to the public view page we see this:

enter image description here

Going back to the product catalog page we see that the swatch images have been removed:

enter image description here

Example CSV:


Refreshing or not refreshing Magento index has no affect either way. All caches are turned off.

Magmi image import settings are:

enter image description here

  • This bug report on the Magmi GitHub page looks promising - github.com/dweeves/magmi-git/issues/183. I tried commenting out "$eventWrapper->setProductIdsOverride($mediaProductIds);" in...../Observer.php as suggested and it prevents the images being deleted, but it's really just a work-around. I think the issue may be caused by the Configurable product swatch images referencing the same file as the Simple product images. May 21 '15 at 19:00

Following way is working for me.Hope it will work for you!

Setup of image attribute

Following is way to add the media image(media/import)

  • Yep, that's similar to the format I used although I didn't include double quotes because my names don't include commas; and I also included labels as described in the Magmi Wiki: wiki.magmi.org/… May 19 '15 at 18:15

It seems like your image search path is not correct as it should be.

you can see below configuration which is working for me.

enter image description here

i am sure it will helps to you. Also just see for good answer given by Alex here

to manage CSV format in configurable products.

  • Thanks, yes I was somewhat over zealous with the search path :-) Only ../media/import was needed in my case. Changing the search path didn't affect the problem symptoms. May 19 '15 at 4:50
  • @DanielFlippance, will you please double check in import folder all images available there and should be with proper permission so magmi can access.
    – liyakat
    May 19 '15 at 10:19
  • All files exist and have read access for all users. Here's what the Dog-swatch image shown in the question looks like in media/import: -rw-r--r--+ 1 name name 162484 May 11 23:17 12288.jpg May 19 '15 at 18:11
  • it should be 755 or 775 permission for all images. may be work for you
    – liyakat
    May 20 '15 at 2:07
  • Why would Magmi need write/execute access to the files in media/import? It is only reading them. May 20 '15 at 2:24

the truth is,images were not deleted,but only filename removed from database because the default catalog module remove duplicate image

You can solve the problem like this :

Rewrite the model class Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media in your own module and modify loadGallery() function like this

public function loadGallery($product,$object) 
    //$this->_removeDuplicates($result); please comment this

this solved above problem in my case.


Not the answer you're looking for? Browse other questions tagged or ask your own question.