I would really advise against this, but you could create a script on your own server that pulls the image through the API, caches it and serves it. You can then restrict access as you like without making the images publicly available.
An example goes through a script:
$headers = get_headers($realpath); // Real path being where ever the file really is foreach($headers as $header) { header($header); } $filename = $version->getFilename(); // These lines if it a download you want to do // header('Content-Description: File Transfer'); // header("Content-Disposition: attachment; filename={$filename}"); $file = fopen($realpath, 'r'); fpassthru($file); fclose($file); exit;
This will barely βtouch the sidesβ and should not delay your files too much, but you still need to take some resources and bandwidth.
source share