• Hi experts,

    In my wp-content/uploads folder, there are also plugins related folders which are stored in there… not sure why are these plugins in need of storing files in this folder.

    I have created a subdomain, which I would like to just store the product related photos in there. (excluding those plugins files).

    Anyone know if its possible? I know I can shift the whole upload folder content to the subdomain and link up the photos in SQL database etc… but that’s not fully what I want.

    I just want product photos in the subdomain, clean cut.

    Any experts can shed some light on this ?

    Thanks.

    • This topic was modified 3 years, 1 month ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    It should be possible by filtering (with the ‘pre_move_uploaded_file’ filter) where uploaded files are moved to from the temp folder. The ‘wp_handle_upload’ filter is also used so the proper destination is represented in attachment properties. This filtering would need to somehow know which are product photos and which are not. This is the part I’m unsure about. Maybe something in $_SERVER or $_POST arrays would distinguish which are which.

    By doing this, all the product photos will still appear with all the others in the media library, so other than altering their physical location, I’m unsure what you’d gain by doing this.

    Another possible solution would be to associate a taxonomy with image attachments. Then you could filter the library display by taxonomy terms. To avoid the need to manually assign terms, the upload process would still need some way to determine which are product photos and which are not.

    There may or may not be an existing plugin that accomplishes this. IDK. I’d expect the taxonomy approach to be more useful and more likely to have an existing plugin to accomplish it.

    Thread Starter allstarsft

    (@allstarsft)

    Thanks for your reply.

    I forgot to mention, Product photos are under Woocommerce.

    I would have thought a code snippet might do the trick? Like defining where the files will be stored (ie in specific subdomain).

    The key thing now is, default uploads folder is messy as there are other plugins’ files/folders inside.

    The solutions you mentioned seems too abstract for me to achieve…

    Thank you.

    Moderator bcworkz

    (@bcworkz)

    It’s a little more than a simple snippet if the code needs to distinguish product photos from other uploads.

    There might be plugins that allow for better uploaded file organization. I did a quick search and it seems the available plugins generally relocate all images, not just product images. Unless you’re doing a lot of file management via FTP, the physical file organization isn’t as important as the organization as seen through the media library. The default filtering by media type and date leaves much to be desired.

    IMO, being able to assign and organize the media library with taxonomy terms would be the most beneficial. There does appear to be a number of plugins towards that end.
    https://www.ads-software.com/plugins/search/organize+media/

    Thread Starter allstarsft

    (@allstarsft)

    Noted.

    I already used Real Media Library to organize the product photos into Brands (folders).

    Just that still messy… so instead I created a Main folder to store all the brands folders in. (It’s taking lots of time now moving photos using Real Media Library into the Main folder for now.)

    So that’s the only way after moving all to subdomain too.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Move only Product photos or Product related PDFs, + Pricelist to subdomain.’ is closed to new replies.