Might wanna look at
https://developer.wordpress.org/reference/functions/wp_upload_dir/
In definition there is a hook upload_dir, you can use that to change path.
Haven’t tried or tested it, but you can give it a try.
Related Posts:
- How to replicate Media Library “Add New” on Plugin Settings Page
- upload image to wordpress media library failed for custom post type
- Enhance Media Manager for Gallery
- Checking if a file is already in the Media Library
- Saving data-URI to media library
- Can I use the wp media uploader for my own plugin?
- How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS
- Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?
- WordPress Media mime type filter problem 4.0
- Using the component outside the editor. select(‘core’) is null
- What filter should I use to insert a button inside on Media>Add New
- How to enable sorting in custom media uploader in plugin
- Create a new post using rest api and save featured image using an external image url
- Upload multiple images and insert them into custom html code
- wp_editor add media button not working
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- wp.media Uncaught TypeError: Cannot read properties of undefined (reading ‘state’)
- Changed media upload path for plugin, but generates error & shows wrong url
- How to destroy or dispose wordpress uploder/manager?
- Thumbnails for media Library images
- How do you filter get_media_items by mime type in a custom media upload tab?
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Upload to a specific media folder created by FileBird Lite
- Load images from CDN and custom features to “Add Media” dialogue
- wp media uploader and ID3 tags
- WordPress Media Uploader not displaying image that has just been uploaded
- How can I add an image upload field directly to a custom write panel?
- How to Fix HTTP Error When Uploading Images?
- Upload images to remote server
- Custom collection in media manager?
- Standard location for plugin to save/cache files?
- Which filters or actions to use after a media upload and delete?
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to hide media uploads by other users in the Media menu?
- Password protect some uploaded files, so only logged-in users can view them
- Attach Files Metabox
- Append button to WordPress Image Details modal
- how does wp.media javascript library work?
- WP3.5 Media Uploader – how to make it accept multiple images?
- Mediaelement.js feature doesn’t work
- Why are two functions over-riding each other?
- How can I view all WP generated thumbnails in Media Manager?
- How to disable WordPress Media resize different size version?
- Media library storing files in uploads not folders within in uploads
- Proper way to hook wp_get_attachment_url
- How to host different file formats/types for a media attachment without creating multiple attachments?
- Sharing a common set of image files for media library, across all sites within multisite
- Site icons with alpha channel for self-hosted WordPress blog network
- Cannot upload .mp3 file to wordpress media
- HTTP Error when uploading files above 7mb unless using GD Image Editor
- Using the default wordpress uploader inside plugin
- Changing upload dir in a plugin regardless of post type
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- How organize uploaded media in WP?
- Restrict WordPress Media Library for a specific user role (users can only see/select own media)
- Multisite – Images often getting uploaded to the wrong month directory
- Capture mediaelement events
- Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically
- Why is the temporary upload always 4.1K
- Using wp_enqueue_media() with switch_to_blog() issue
- Media library only shows for admin. Doesn’t show editor or below [closed]
- Too slow Image upload in WordPress Media Library as image number increases
- WordPress Specified file failed upload test
- upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB
- zip unzip attachments in wordpress
- PHP error when trying to upload .mp3 files via Media Library [closed]
- Migrating media files (documents only) to a fresh install and maintaining the same directory structure
- WordPress media upload issue could not insert attachment into the database
- Thumbnail images missing in WP media library
- Cleaning a filename after image sideloading a url that contains `%20`
- Remove Media File Items From Server That Do Not Exist in Media Library
- What if I have a large file on the server that I want the wp library to have?
- How to create wordpress media library UI on plugin page
- How to upload large media file in chunks, without any plugin?
- Insert and read media from the WordPress library and call in the plugin
- Efficient way to move media folder to another folder
- Make inline uploader (plupload) on options page upload to a specific folder
- function add custom fields to media gallery
- Can’t upload format files on media library
- How to add HTML into error message
- unsharp thumbnails after uploading image
- WordPress5.2.3: Better File Download Plugin validation issue
- WordPress discards PNG file when uploading plugin file
- Hook for validating and rejecting frontend image upload
- Media Library: Remove replace images of selected author
- How to upload multiple images using WP rest API to media?
- Organising and display thousands of photos in media library
- Organizing the Media Library for Cleanup
- Insert media while posting is not working with new wordpress update
- Dynamic banner for use on external sites
- How can I add a Description column to the media library browser screen?
- Creating custom Insert Media page
- wordpress 3.6 media manager cropping timestamp
- Broken Media Library
- Edit Image/Image Details – Replace button missing
- Media Library is not loading on grid view in admin panel
- Blurry Images WordPress 5.8.1
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- How to Upload a media item with alt text and description
- WordPress Playground and uploading permission issue