After a while coming here to get something, I will give something.
This module is not even a module, I’m a bad developer, it just works without being heavy (40lines of code) but I’m sure it can be greatly improved. Major “issues” are that it runs using jquery (which is an additional js lib, increase loading times) and that the code is directly in the “catalog/product/view/option.phtml” file, I didn’t try to separate it clearly because I don’t want to waste my time for now.
So here’s how it works :
1 - To associate an image with a specific option, the admin just need to “label” the image properly following this convention : $option_name + “__” + $option_value (for example : “color__blue” will be associated with the blue option of the color dropdown)
2 - the options.phtml file will check the product options to see if there is any dropdown to process. If this is the case it will foreach dropdown option check the images of the product to see if there is an image associated to the option (with the label created earlier).
This way we can have a classic dropdown with 0 associated image (works like magento default behavior) . We can have a dropdown with only some options changing the image (which means if we don’t associate images with every option, it will still work) and We can have a dropdown with every option changing the product’s image.
So as it’s very new and I don’t know how I can give it to you, you can see the page I’m using it on here : http://serv1.dezign.fr/mybabyz/les-bodys/test.html/ (on the “couleur” select only the first two options have a specific image and on the “taille” select it’s only the last one).
If you have any advice or question to improve this very simple module, go ahead