2

I am in the process of migrating from Zen Cart to Magento. In Zen Cart my product images were sorted into folders by Category name..I have read that Magento stores product images according to the first and second characters of the file name but as all of my images start with IMG_, is this a problem performance-wise? Or would it be better to keep the folder structure according to Category name?

1 Answer 1

2

There will be no real performance benefit from renaming images. One of the times where the size of a folder can hinder PHP performance is if you are calling functions such as scandir etc that get a list of all contents within a folder. On large thousands+ folders this can be slow and improved using RecoursiveItterators as an example.

As Magento is not scanning directories for images to load instead loading by filename you will be safe to remain with the current implementation you have. Until it comes time to revisit the images and you are hunting for the blue t-shirt that is named _IMG_SOME_RANDOM_NAME_ :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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