This plugin will download the files from production to staging. But what if a 302 redirect is fine?
Try this addon (a few lines):
Thanks for your contribution! UBP is also on Github to discuss features (and pull requests!).
Can you clarify your use case a bit for me? Your patch page says UBP "will fetch all files to your development uploads dir," but that is not the case. UBP only fetches images at the first time they are viewed on staging. So, even for sites with very large uploads directory, only a very small subset of images will be downloaded: those displayed on the home page, for example.
The main reason I preferred download over a 302 redirect was for performance: when downloading, the plugin only runs once for each image (when it is not found). When running a redirect, the plugin (and all of WordPress!) is reloaded for every image. This can cause significant lag: images that would normally begin to load instantly must first take 1 to 2 seconds to reload WordPress + plugins before then redirecting (for every image, on every page load).
Is there another case I'm missing that you feel a 302 better resolves?
You must log in to post.