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 do I display a PDF thumbnail as a link to the PDF without uploading the image
- Featured Image add tab
- Uploading Multiple Attachments From Front-End With A Description
- getting uploaded SVG dimensions on front-end
- Replace all of post’s image URLs with upload directory URLs
- How to display a shortcode caption somewhere other than the_content
- Image size filtering in Media uploader according to custom post type
- Uploading images to Media Library fails with Memory Exhausted
- Edit image preview is not displayed
- How to set a Minimum Image Dimension for Uploading
- get_attachment_id() only get id of first attached image after post update
- Multisite media library uploads broken images
- Custom page template to display all image attachments
- HTML tags in WordPress image caption
- Find unused images?
- Is there a plugin or simple way to add a multiple images metabox to a post?
- How can I upload an image for background use using the Theme Editor in WordPress?
- Show media url immediately after upload in media uploader
- Site migration – some images not displaying in Media Library
- Image upload appearing as broken images following server move
- Why does WP allow to view and media item as a page
- Function to remove all classes on images inserted into posts?
- How to get the real file type for images that do not have an extension
- Images don’t update after being edited
- Weird encoded error when using wp_generate_attachment_metadata()
- What is the best way to associate multiple images to one page?
- How to get the cropped image from media library?
- Can’t seem to see images on my machine but can on the server
- get rid of random string before an for an image path on wordpress
- wp_insert_attachment() dupplicate attachment posts
- Newly uploaded images are not updating in featured image
- How to stop a post from publishing if the file upload is not a image/gif
- problem with updating metabox of upload image
- controlling whether upload is attached to post or not
- How do I embed youtube video via url in frontend posting
- Media upload in add comment meta box
- My image rotate 90 degree
- How can we see which posts don’t have a featured image or it doesn’t exist anymore?
- Can’t manage to display an uploaded picture (uploaded from a custom button) in the front end
- WordPress API, creating Featured Media from image url (nodejs)
- Image Attachments Query Not Working If Post Is Loaded Via Ajax
- if user role is x – show image – wordpress
- Attachment tag archive