Plugin Support
Nik
(@nikitaanisimov)
Hi @olegburca, Nik from 10Web.io here,
Thanks so much for your suggestion!
At the moment, our plugin’s default storage location is set to wp-content/uploads/photo-gallery, and this logic is built into its current structure. Unfortunately, it’s not possible to change this path, and we don’t have plans to introduce such a feature in our immediate roadmap.
We really appreciate your understanding, and if there’s anything else we can assist with, please don’t hesitate to reach out.
Yes — what’s happening here is that the Photo Gallery plugin is bypassing WordPress’s normal media API and writing files directly into its own folder. That’s why your offloading-to-S3 plugin never gets a chance to intercept the upload.
In WordPress, the usual flow is:
- Files are uploaded via
wp_handle_upload() → wp_upload_dir() → Media Library.
- Your S3/offload plugin hooks into those functions, swaps the storage location, and rewrites the URLs.
But Photo Gallery (and some other gallery plugins) does this instead:
- Creates its own folder (e.g.
/wp-content/gallery/...)
- Moves files there directly with PHP file functions, ignoring WordPress’s APIs.
🔧 Your Options
- Check plugin settings first
- Some gallery plugins (including Photo Gallery by 10Web, for example) have an option like “Use WordPress Media Library” or “Store in Uploads”. If enabled, all images go through the normal uploads folder, which your S3 plugin can then offload.
- Code-level workaround
- If no such option exists, you’d need to hook into the plugin’s upload process and filter the upload path. Typically, WordPress allows overriding upload directories with the
upload_dir filter. But since Photo Gallery bypasses this, you’d need to either:
- Override its file-saving function via
add_filter or add_action if available.
- Or modify the plugin so it calls
wp_handle_upload() instead of move_uploaded_file().
- Indirect approach (sync local → S3)
- If rewriting the plugin isn’t viable, you can still configure your offload plugin to scan additional directories or run a cron job that syncs the gallery folder to S3. Many S3 plugins (e.g. WP Offload Media) have filters like
as3cf_upload_attachment where you can extend their scope.
- Plugin replacement
- If the plugin doesn’t offer hooks and modifying it is too brittle, consider switching to a gallery plugin that fully integrates with the WordPress Media Library (NextGEN Gallery, Envira Gallery, etc.), so your S3 solution just works.
✅ Best long-term solution: Check if your Photo Gallery plugin has an option to use the Media Library. If yes, turn it on → everything will offload automatically.
⚡ If not, you’ll need either custom development (force it through WordPress’s media upload functions) or extend your S3 plugin to watch the gallery’s folder too.