WordPress doesn’t allow you to edit your WP media files’ URLs.
Therefore, if you want your WordPress Media Library image URLs to look like this: my-tutorial.jpg or my-product.png instead of looking like this: 2323433.jpg, you won’t be able to do it.
Fortunately, we’re glad to tell you that, with the Media Library Spreadsheet plugin, you can quickly rename all your image URLs based on the post title.
This way, your image URLs will have the post title instead of the original file name as the slug. No matter if they are attached to posts, pages, products, events, donations, etc.
The Media Library Spreadsheet plugin displays all your Media Library files in a spreadsheet where you can do advanced searches in seconds and apply massive changes to your files in seconds.
Once installed and activated, go to WP Sheet Editor > Edit Media. You’ll see the spreadsheet containing all your files displayed as rows and the fields displayed as columns.
Now just follow these simple steps.
1- Open the “Bulk Edit” tool
With this spreadsheet, you can quickly edit thousands of media files. In this case, it will help you rename the image URLs based on the post titles.
Just open it with one click on Bulk Edit on the toolbar.
2- Search for all the attached images
To search for all the attached images, you need to select “I want to search rows to update and edit all the search results”. This will open a search tool for you to filter all the attached images.
Now just select these values to search for all the attached images.
- Tick the Enable advanced filters checkbox and select these values:
- Field key: Format
- Operator: CONTAINS
- Value: image
- Click on Add new to create another advanced filter, and select these values:
- Field key: Attached to this post
- Operator: !=
- Value: Leave it empty.
- Click on Run search to filter all the attached images.
3- Copy the associated post title to the file name
Once all the attached images have been filtered, you’re ready to rename their URLs based on the post title. You need to select these values to copy the associated post title to the file name in all of them.
- Select the rows that you want to update: I want to search rows to update and edit all the search results
- What field do you want to edit: File Name
- Select type of edit: Copy from other columns
- Copy from this column: Attached to this post ($post_parent$)
- Click on Execute Now.
Now the previous file names have been replaced with the title of the post to which the images are attached. As you can see in this screenshot, the content in the Attached to this post column is exactly the same as the content in the File name column.
You don’t need to worry about spending lots of hours trying to edit your Media Library files.
Following this tutorial, you can rename thousands of images and our plugin will automatically change the image URL and it will update all the posts using the image.
This only takes 5 minutes of your time and it will improve your SEO greatly.