Allow overriding Elementor uploads directory (decouple from wp_upload_dir()) #35667
rajandangi
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the Problem
Elementor relies directly on
wp_upload_dir()for storing generated assets (CSS, local fonts, etc.).When using S3/offload setups (e.g. Cloudflare R2 or S3 Uploads), this causes Elementor assets to also be stored in remote storage.
This is not always ideal, as these files are generated frequently and are better kept locally for performance and reduced external writes. Also, to reduce R2 Class A operations.
Currently, there’s no way to control this independently from the global uploads directory.
Propose a Solution
Add a filter to allow overriding the uploads directory used by Elementor.
Example:
This would allow developers to keep Elementor assets local while still offloading media.
Additional Context
This pattern is used in other plugins (e.g. Gravity PDF filters), and would improve compatibility with modern WordPress setups using object storage.
Agreement
All reactions