Add 'UPLOADS_URL' constant to work in tandem with the 'UPLOADS' constant
|Reported by:||wesrice||Owned by:|
I've looked at core and see that the uploads url is now based on WP_CONTENT_URL. Thus, all images urls are prepended with WP_CONTENT_URL, which is fine unless the developer has decided put their images above their WordPress installation.
Personally, I have my WordPress install in a subdirectory and define 'UPLOADS' as '../uploads' to get my uploads folder as the same level as my WordPress install. I do this not only for organizational purposes, but also for the safety of my website, particularly if a client decides they need to utilize their FTP. I don't want them mucking up WordPress. I also like putting WP in subdirectory for obscurity from the outside world.
I've read an argument against defining UPLOADS_URL in the config as a constant because it would likely confuse new users. I hardly think that is true, because most new users won't even need to define UPLOADS in their wp-config.php file.
For now it looks like users have to manually set the 'upload_url_path' option in their function.php file to override this, which is hardly ideal, especially when working with multiple environments for dev, staging and production.
I am under no impression that I am fringe case, and I think UPLOADS_URL should be considered regardless of my situation. If a USER could make this decision (as they have for years in the Dashboard Settings), then a DEVELOPER should be able to make this decision themselves now.
Change History (4)
comment:1 markoheijnen — 15 months ago
- Keywords close added
- Severity changed from critical to trivial
- Keywords 2nd-opinion ux-feedback close removed
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Severity changed from trivial to normal
- Status changed from new to closed
- Type changed from feature request to enhancement