Assuming your old site is still accessible, I would just go Tools -> Export and create an export file containing your media.
In the new WordPress server, import the file and select the option to “Download and import file attachments”. (your old site needs to be public for this to work).
This seems to be good guidance: https://www.itjon.com/moving-posts-and-media-between-wordpress-blogs-with-wordpress-importexport/
If you just copy the uploads folder, WordPress knows nothing about this and all your image references will be 404. Even if you import the media by dragging everything from your uploads folder from old site, they will have different IDs, so I would advice to follow the import method.
Once you have done this, you might want to use a plugin to find stale images and remove them. There probably is a performance gain from getting rid of image references that are somewhere in the database.
Related Posts:
- Consolidating two websites into one, but migrated images not appearing in Image Library
- Blank image thumbnails in media library
- Programmatically adding images to media library
- Programmatically get images by URL and save in uploads folder
- Upload images to remote server
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- What’s the proper way to find and remove duplicate images from posts and the media library?
- Separate Media Library for each user
- Images dont show in grid view, but do in list view
- How can I hide media library images from general users?
- How to rename an image attachment filename using php
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- WordPress function: limit size, only jpg, jpeg, limit of uploaded files per account
- Import Images from one self-hosted WordPress install to another
- Uploading images to Media Library fails with Memory Exhausted
- Why can’t I edit certain images from the WordPress Media library?
- Edit image preview is not displayed
- Uploading images: ‘ø’ get replaced with ‘ø’
- How can I autopopulate titles in the media library?
- Regenerate missing _wp_attachment_metadata
- Upload thousands of images to WordPress without plugin?
- How to make programmatic image upload generate thumbnail and sizes?
- Best way to strip character entities (%20 etc)
- Different upload path per file type
- Display latest 12 images from media library
- Get full image array
- Bulk image rotation
- How to order images in a post in WordPress 3.3?
- Check if the image exists in WordPress media library
- unattached media files that should be attached
- Image thumbnails not available post migration, but still accessible via direct URL – DB issue
- Site migration – some images not displaying in Media Library
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- Migration to WP – Couldn’t load image
- How to upload images in a specific folder using API
- AJAX – save an $_FILES picture in media library
- In Wordress one author can not see the other’s author uploaded images through media library
- How to open default wp image editor screen dynamically?
- How to prevent WordPress scaling large images down
- Is it possible to split Default WP Media directory to multiple Folder/Subdomain?
- How to get file URL from media library
- Images uploaded to the media library has strange colors. However, in the edit screen the color is ok
- Change media URL (images)
- Alter image meta fields in the Media Library
- How to add images to a post without inserting them into the content area of the post editor?
- Uploaded images not displaying in network site
- Why does WP allow to view and media item as a page
- How to limit the number of images displayed in the media window?
- Get images attached to a specific page
- Images don’t update after being edited
- Is there a way in WordPress to convert images to WebP without a plugin?
- Can’t see images in posts after migrating site to subdomain
- Images not showing in media grid view (but showing in list view)
- Some Images Disappeared from Media Library?
- After Migration, images show up on a preview of the page but not the actual page [closed]
- are unattached media files a problem?
- How to get the title of the random images from media library?
- How to change the value “uploaded to” in the media library (WordPress 4.0)
- Function to grab specific image IDs from media library.
- Fetching uploaded images using Link URL
- How to replace post image url before posting using api?
- Allow wp media library to check already selected images displayed in div
- WordPress append -1 to the image name
- Media Library Cleanup A Thought Exercise
- Could creation of various image sizes cause slow form submission response?
- imported post image as normal image instead encoded image
- Post-processing of the image failed
- still need help-images inside wp-content/ uploads/ are not showing up in my media library and uploaded using FTP protocol
- After migration, all featured images using accentued characters in their file names are displayed “blanked”
- A query to substitute images paths in gutenberg (website migration)?
- WordPress Link To Image Missing Dropdown
- Broken images in media library
- Broken images/videos after migration – DIVI theme- works ok on Mac OS
- Images are not getting uploaded
- Unable to delete images in Media Library
- Theme page headers and rotator images not assigned after website migration
- Edit image itself
- How can I use images that are on the server locally?
- Change the image for a certain URL
- Assign one featured image to multiple posts?
- Some images don’t get linked when setting link-to to media-image
- Missing Images in Uploads Directory (Server Only)
- How do I embed an image at actual size?
- Image media upload problem in page editing modus?
- Transfered live site to new server and images are not showing
- Limit files uploaded per folder
- Post migration – images do not display
- Images will not attach to posts after site migration
- My image rotate 90 degree
- How do I change a Themes Header Image?
- Media Library is not loading on grid view in admin panel
- Blurry Images WordPress 5.8.1
- Remote Image (from URL) as Media Library element
- WordPress can’t get image url but both the attachment and the actual file are there
- Why some images are not allowed to be edited only for thumbnails?
- What does WordPress media uploader do to image files on upload?
- Media Library shows default image instead of image preview
- Images have dissapeared from media library and site
- Is there a way to upscale a media library original image to the nearest whole pixel in WordPress?
- How to make Media Library files private?