I am creating a module that allows to create some objects and upload images for them.
For the moment, I am uploading images in the module folder itself. But I think it is better to store them in PS img
folder like for product and category images. One of the reasons is to avoid their deletion when module is deleted mistakenly from backoffice.
Is there any other reason to store/ not store images in img
folder? What is the best place to store a huge number of uploaded images?
Your ideas are much appreciated. Thanks in advance.
Yes, it's better to save your images in the img
folder. The most important reason for doing this: this route will never be blocked by robots.txt
.
In my modules, (in order to be more orderly,) I create a folder called "module" and then inside this folder, I create another folder called the my-module-name
.
img/modules/my-custom-module/test.jpg