Open ADDISON74 opened 3 years ago
for sure, I never used the swatches so I'd have to look into that :-)
Check this out: https://info2.magento.com/rs/magentosoftware/images/Magento_Community_Edition_User_Guide_Latest.pdf.
Pages 209 - 226 Chapter 16: Swatches
from what I'm reading swatches images are in wysiwyg/swatches folder, which we should exclude from the processing right?
You're right the swatch images are stored in this directory /media/wysiwyg/swatches.
Your extension checks already the contents of the WYSIWYG directory and lists all orphan files. The question is whether we should separate the swatches and treat them in a special way.
in the meanwhile I pushed https://github.com/fballiano/magento1-image-cleaner/commit/c76c077d2ebcfc45055b2ce922f22e96557fca54 which avoid processing wysiwys/swatches if swatches are enabled (during a wysiwyg sync)
Excellent. Skipping this directory was very important to avoid any issues.
After investigating custom swatches feature here are more insides. Before using the swatches coming from this directory you have to do the following actions:
In conclusion, a swatch image becomes orphan when its value it is not associated with an attribute value (e.g. attribute Color has no Red value, but there is a red.png file).
What do you thing about adding Color Swatches in the list for removing the orphan images?