Ever wanted to change an image file name after uploading it to WordPress? Image file names are important for image SEO and can help more users find your website.
曾经想过将图像文件名称上传到WordPress后更改其名称吗? 图像文件名对于图像SEO很重要,可以帮助更多用户找到您的网站。
While WordPress allows you to change an image alt tag and caption, there is no built-in option to change an image file name from the admin area.
虽然WordPress允许您更改图像的alt标签和标题,但没有内置选项可以从管理区域更改图像文件的名称。
In this article, we will show you how to easily rename images and media files in WordPress. We’ll also show you a method to replace media files after renaming them on your computer.
在本文中,我们将向您展示如何在WordPress中轻松重命名图像和媒体文件。 我们还将向您展示在计算机上重命名媒体文件后替换媒体文件的方法。
为什么要在WordPress中重命名图像和媒体文件名? (Why Rename Images and Media File Names in WordPress?)
Images can help you get more traffic to your website. Particularly, if you upload original images and other media files to your website.
图片可以帮助您增加网站访问量。 特别是,如果您将原始图像和其他媒体文件上传到您的网站。
However, unlike text, search engines and users both need your help to describe those images. This is a major part of optimizing image SEO.
但是,与文本不同,搜索引擎和用户都需要您的帮助来描述这些图像。 这是优化图像SEO的主要部分。
One of the best ways to help search engines and your users find these images is by giving them a meaningful filename. For example, a file name like newyork-skyline.jpg is a lot more helpful than DSC00789.jpg.
帮助搜索引擎和您的用户找到这些图像的最佳方法之一是为它们提供有意义的文件名。 例如,像newyork-skyline.jpg这样的文件名比DSC00789.jpg有用得多。
Now the problem is that a lot of users upload images directly from their phones or cameras. Some users download images from other sources and forget to rename them before the upload.
现在的问题是,许多用户直接从手机或相机上传图像。 一些用户从其他来源下载图像,而在上传之前忘记重命名它们。
Once you have uploaded those images to WordPress, there is no default option to rename those images or any media files.
将这些图像上传到WordPress之后,没有默认选项可重命名这些图像或任何媒体文件。
Having said that, let’s take a look at how to easily rename images and media files in WordPress.
话虽如此,让我们看一下如何在WordPress中轻松重命名图像和媒体文件。
在WordPress中重命名图像和媒体文件 (Renaming Images and Media Files in WordPress)
This method does not automatically change the image file name in WordPress. However, it does allow you to manually change an image filename inside the WordPress admin area.
此方法不会自动更改WordPress中的图像文件名。 但是,它确实允许您在WordPress管理区域内手动更改图像文件名。
The first thing you need to do is install and activate the Phoenix Media Rename plugin. For more details, see our step by step guide on how to install a WordPress plugin.
您需要做的第一件事是安装并**Phoenix Media Rename插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。
Upon activation, simply go to Media » Library. If your media library is displayed in the grid view, then you will need to switch to the list view.
**后,只需转到Media»Library 。 如果您的媒体库显示在网格视图中,那么您将需要切换到列表视图。
This will allow you to view more details for each media file including the file name.
这将允许您查看每个媒体文件的更多详细信息,包括文件名。
Next, you need to click on the ‘Edit’ link below the image or media file that you want to rename.
接下来,您需要单击要重命名的图像或媒体文件下方的“编辑”链接。
This will open your image in the WordPress media edit screen. From here, you can edit details of an image like Alt tag, caption, and more.
这将在WordPress媒体编辑屏幕中打开您的图像。 在这里,您可以编辑图像的详细信息,例如Alt标签,标题等。
Scroll down to the bottom and you’ll see the filename field.
向下滚动到底部,您将看到文件名字段。
From here, you can change the file name. We recommend giving it a keyword-focused and meaningful name that actually describes the image. We recommend only using all lowercase letters and dashes between two words.
在这里,您可以更改文件名。 我们建议给它一个以关键字为中心且有意义的名称,以实际描述图像。 我们建议仅在两个单词之间使用所有小写字母和破折号。
After that, click on the ‘Update’ button to save your changes.
之后,单击“更新”按钮以保存您的更改。
That’s all. You have successfully renamed the media files without leaving the WordPress admin area. The plugin will also update the file name if you have used the image in a post or page.
就这样。 您已经成功重命名了媒体文件,而没有离开WordPress管理区域。 如果您在帖子或页面中使用了图片,该插件还将更新文件名。
替换WordPress中的图像和媒体文件 (Replace Image and Media Files in WordPress)
If the above method does not work you, then you can try this method. Basically, you’ll download the file to your computer and rename it there.
如果上述方法不起作用,则可以尝试此方法。 基本上,您将文件下载到计算机上并在其中重命名。
After that, you’ll replace the original file on your website with the renamed version by using a plugin.
之后,您将使用插件将网站上的原始文件替换为重命名的版本。
The first thing you need to do is install and activate the Enable Media Replace plugin. For more details, see our step by step guide on how to install a WordPress plugin.
您需要做的第一件事是安装并**Enable Media Replace插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。
After that, visit Media » Library page. If you are using the grid-view, then you would need to switch to the list view.
之后,访问Media»Library页面。 如果使用的是网格视图,则需要切换到列表视图。
You will now see a new link to replace the media below each item in your media library.
现在,您将在媒体库中每个项目下方看到一个替换媒体的新链接。
This will bring you to the replace media page.
这将带您进入替换媒体页面。
First, you need to choose the file from your computer that you want to upload and replace the old file with. Make sure that you have already changed the file name on your computer.
首先,您需要从计算机中选择要上传的文件,然后将其替换为旧文件。 确保您已经更改了计算机上的文件名。
After that, you need to scroll down a little for more options.
之后,您需要向下滚动一点以获取更多选项。
Under replacement options, you can choose whether you just want to replace the file or also want to replace all the links. We recommend using the second option if you have already added that file to your WordPress posts and pages.
在替换选项下,您可以选择是只要替换文件还是要替换所有链接。 如果您已经将该文件添加到WordPress帖子和页面中,则建议使用第二个选项。
You can also choose to keep the old date or use a new date.
您也可以选择保留旧日期或使用新日期。
Finally, click on the ‘Upload’ button to replace the old media file with the new and renamed file.
最后,点击“上传”按钮,用新的和重命名的文件替换旧的媒体文件。
We hope this article helped you learn how to easily rename images and media files in WordPress. You may also want to see our article on best WordPress image compression plugins compared.
我们希望本文能帮助您学习如何在WordPress中轻松重命名图像和媒体文件。 您可能还想看一下有关最佳WordPress图像压缩插件的文章。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress****。 您也可以在Twitter和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/plugins/how-to-rename-images-and-media-files-in-wordpress/