Is it possible to split Default WP Media directory to multiple Folder/Subdomain? Coz, WP auto-generated images make sure responsive. So, I want to split media directory to separate fo Example: Featured Image Directory, Main Image, 300x300 Crop etc

I tried below code on wp-config.php, but it works for a single directory, not multiple :(

define( 'UPLOADS', 'wp-content/'.'example' );
  • I'm not sure why would you want this, the internal structure of the wp-content/uploads folder shouldn't be relevant and has no bearing on the browser or SEO. Code should handle attachment IDs, not attachment file URLs. Can you provide some context? – Tom J Nowell Mar 8 '18 at 21:26
  • When I upload an image to my post, it's automatically generated 3 different dimensions. I'm trying to change each generated images from the different directory. Example: postimage.jpg, postimage-300x300.jpg, post-image-150x150.jpg. Now, I want to separate 300x300, 150x150 from separate media directory. – Ayesha Akter Mar 8 '18 at 21:32
  • I understand what you're trying to do, but I don't know why you're trying to do it. What's the reason behind doing this? I don't see the benefit or the problem it solves – Tom J Nowell Mar 8 '18 at 22:32
  • I just checked my Media folders. Currently, It contains 140K+ images file :( – Ayesha Akter Mar 8 '18 at 23:10
  • 1
    that's a lot of files but I don't see what that has to do with moving files into other folders. I take it you don't have the organise into subfolders by date checkbox checked? You should never need to go into that folder, it's managed by WP. Please explain the original problem that your question is trying to solve rather than the solution you've come up with to solve it – Tom J Nowell Mar 8 '18 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.