1

By default, WordPress Media Uploader Gallery picks up images from the /uploads folder as given in wp-config file.

I have a requirement where instead of uploading to this WordPress location, I need to upload to a remote server wherein I need to store these images and then display all the images available on the remote server in the same WordPress gallery.

Here is a plugin which does exactly what I want but for Amazon S3 bucket. https://wordpress.org/plugins/amazon-s3-and-cloudfront/

As shown in the video in the above plugin description, when the user uploads the image, it automatically stores it in the remote S3 location and then shows the same in the WordPress Gallery, basically leveraging all the existing Media upload features.

I need to do something similar, but instead of S3, need to hit my remote server and retrieve and show those uploaded images in the Gallery.

Any hooks/actions available to implement this? Basically seamlessly hook into WordPress Media gallery.

EDIT: I need to upload it to the remote server using POST and then display all the images from that location.

Any help/lead much appreciated!!

closed as too broad by cjbj, kraftner, Max Yudin, Rarst, Mark Kaplun Jul 7 '17 at 17:59

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    You've already found a plugin that does a similar job, so why not examine their code and find answers to all your questions? Basically it shouldn't be a problem, as WordPress works with absolute URLs for media – kero Jun 23 '17 at 11:26
  • Thanks. I did try. But the code is too S3 specific. i was just looking for any hooks, etc. which can help me to give a remote url and then call the gallery section of WordPress and display those images. – Azerot Jun 23 '17 at 11:31