3

I.e. an uploaded image image.jpg is stored in wp-content/uploads/2016. WordPress will generate thumbnails named image-150x150.jpg, image-300x300.jpg, and image-1024x1024.jpg in the same directory.

Is it possible to store the additional image sizes generated in a subdirectory, such as wp-content/uploads/2016/thumbs?

  • good question, and most likely it is possible, but why not to do some research and find it out by yourself? It not like only "experts" on this site have access to the wordpress code.... – Mark Kaplun Sep 11 '16 at 7:46
  • It is not that I have not pursued recherche: 1. I first searched for a plugin, that solves my request. But I´ve found none yet. 2. I studied media.php to understand how WordPress generates thumbnails. My naive idea: adding a code snippet like /thumbs at the corresponding position in code. But this is not as easy as I had imagined. 3. I´ve searched the net and only found this: link But this script just moves WordPress generated thumbnails to ./thumbs/ folder afterwards. This is not, what I am looking for. – kamath Sep 11 '16 at 18:10
  • @MarkKaplun: if you have an idea how I can solve my request , I am pleased with your support. Just because I do not have any solution it was my motivation to ask this question here in the forum. – kamath Sep 11 '16 at 18:15
  • Check the core for the upload process code (evades my memory right now), and check how the files are generated. Maybe there is an appropriate filter over there. Worst case - find a hook after the upload was finished, copy the files to the directory in which you want them and update the relevant meta data for all the generated sizes – Mark Kaplun Sep 11 '16 at 19:10
  • I assumed that my project is easy to implement. That does not seem as easy as thought. What struck me in the FTP-view the folder structure due to the numerous thumbnails is pretty confusing. But maybe I have to live with it… – kamath Sep 13 '16 at 6:40

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.