You can do that programatically via wp_insert_attachment()
function.
Here is an example at WP Codex: http://codex.wordpress.org/Function_Reference/wp_insert_attachment
Related Posts:
- How do i upload an image and return the image id?
- Get images attached to a specific page
- Upload images to remote server
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Using Images in WordPress – Best Practices
- Media Upload Folder – how to manage
- Get attachment ID of author_meta image – Attachment Metadata
- Alter media caption/description conflict in WordPress?
- Restrict the number of images to upload per post
- How to upload image without post ID using the new media uploader?
- Rename attachments during upload
- How to add a media with PHP
- What’s the best “insert all images” plugin?
- Different upload path per file type
- Is there a way to get attachment data?
- Rename media files generated during upload
- Link to full size image or attachment page in photo theme
- HTTP Error when uploading files above 7mb unless using GD Image Editor
- media_sideload_image with rewritten urls?
- Change WordPress Media Manager
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- image in my post disappeared after I upload website to remote server
- Pull images from the gallery
- How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product
- WordPress automatically downscaled images larger that original
- Ho to add “Create Slider” option to default “Add Media” popup?
- Auto delete attachments that are older than x days
- Images uploaded to the media library has strange colors. However, in the edit screen the color is ok
- Change wp-content/uploads to uploads/%postname%/%image%
- Blank upload.php page
- Does wp_get_attachment_image_src also work with non-image files?
- Upload media only to DB
- WordPress Creates Unused (Unregistered) Image Sizes
- Is there a way in WordPress to convert images to WebP without a plugin?
- WordPress Attachments with old images
- Disable image rename on upload
- How can i identify media uploaded to my website that is not being used anywhere anymore?
- image URL changed in wordpress
- Attachments without images
- Serving Images from subdomain in wordpress
- User uploads image as “Featured Image” but WordPress resizes it?
- Profile image does not upload
- WordPress append -1 to the image name
- cant upload media/pictures to my wordpress site, cant upload anything to my database
- Upload error on localhost (at minimum, not yet tested online)
- unsharp thumbnails after uploading image
- Updated wordpress missing image upload area
- How to disable post-thumbnail from generation?
- Troubles with code for upload a image
- After I upload a file to library its name converted to dashes
- Missing Images in Uploads Directory (Server Only)
- Broken Media Library
- Upload unnattached image from frontend
- Media Library is not loading on grid view in admin panel
- Blurry Images WordPress 5.8.1
- How to get WordPress to resize images for srcset?
- Uploading media to wordpress API with C# HttpClient
- How to upload multiple images to use as gallery in Kirki Framework
- How do I display a PDF thumbnail as a link to the PDF without uploading the image
- Featured Image add tab
- How to force attachment size for every post
- Add two images with Sweet Testimonials
- Rename uploads filenames to POST-ID on upload
- Set padding for all content except images and few more elements
- Show title when inserting single images
- See the all uploaded images of a user as an admin
- Upload button in metabox not working
- Utilise WP_Customize_Image_Control to only show image picker
- 3.5.x Theme Customize: Handling Custom Control Requests
- Import existing image as a single post
- Media upload in add comment meta box
- Transfered live site to new server and images are not showing
- Limit files uploaded per folder
- Change image link in excerpt to point to post
- Image attachement management – a philosophical question
- wp_get_attachment_link() add rel attribute if the link points to direct image
- Aviary + WordPress Media
- greater flexibility in targeting images attached to page
- Stop Attachment image names from taking top level permalink
- How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- My image rotate 90 degree
- Custom filename when pasting an image from clipboard
- How do I change a Themes Header Image?
- WP is showing wrong image dimensions
- Bug when uploading pictures with Arabic name characters?
- Media upload error
- wp_handle_upload Image sizes
- What type to upload image within theme options?
- How can we see which posts don’t have a featured image or it doesn’t exist anymore?
- Best Photoshop-WordPress workflow for editing images without re-upload [closed]
- Can’t manage to display an uploaded picture (uploaded from a custom button) in the front end
- How to automatically convert images to WebP on WordPress?
- Why some images are not allowed to be edited only for thumbnails?
- My subdirectory sites images (except webP) are throwing to 404 page even they are exist
- Uncaught Error: Call to undefined function file_is_valid_image()
- WordPress API, creating Featured Media from image url (nodejs)
- How to import external media items into wordpress media library (without using storage)
- Delete all thumbnails & regenerate them?
- Broken images after importing posts and opening in Gutenberg