To replace photos and media files in WordPress, follow these four steps:
1. Enable Media Replace plugin should be installed and activated.
2. Set the WordPress Media Library to list view.
3. Under the filename, select the Replace Media option.
4. Select your new file from your computer and upload it.