Title: Clean Image Filenames
Author: Upperdog
Published: <strong>2014 年 10 月 3 日</strong>
Last modified: 2026 年 1 月 14 日

---

搜索插件

![](https://ps.w.org/clean-image-filenames/assets/banner-772x250.png?rev=1001368)

![](https://ps.w.org/clean-image-filenames/assets/icon-256x256.png?rev=1001365)

# Clean Image Filenames

 作者：[Upperdog](https://profiles.wordpress.org/upperdog/)

[下载](https://downloads.wordpress.org/plugin/clean-image-filenames.1.5.zip)

 * [详情](https://cn.wordpress.org/plugins/clean-image-filenames/#description)
 * [评价](https://cn.wordpress.org/plugins/clean-image-filenames/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/clean-image-filenames/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/clean-image-filenames/#developers)

 [支持](https://wordpress.org/support/plugin/clean-image-filenames/)

## 描述

This plugin automatically converts language accent characters in filenames when 
uploading to the media library. Characters are converted into browser and server
friendly, non-accent characters.

### 产品特点

 * Converts accent characters to non-accent, latin equivalents in Swedish, Danish,
   German, and more.
 * Removes special characters like exclamation marks, periods, hashtags, and more.
 * Lets you choose if you want to convert only image files, or all file types.
 * Makes site and server migrations easier thanks to non-accent character filenames.
 * Provides filter hook for developers who want to specify which file types to convert.

### Examples

 * Räksmörgås.jpg  raksmorgas.jpg
 * Æblegrød_FTW!.gif  aeblegrod-ftw.gif
 * Château de Ferrières.png  chateau-de-ferrieres.png

### Worth noting

The plugin only converts filenames when the files are being uploaded. It can not
convert existing files.

### Filter for developers

This filter provides developers a way to specify which file types the plugin should
convert. This filter overrides the plugin settings on the media settings page. For
a complete list of mime types, see [Wikipedia](http://en.wikipedia.org/wiki/Internet_media_type).

The following example will convert PDF, JPEG and PNG files only:

    ```
    function my_clean_image_filenames_mime_types() {
        $mime_types = array(
            'application/pdf',
            'image/jpeg',
            'image/png',
        );
        return $mime_types;
    }
    add_filter( 'clean_image_filenames_mime_types', 'my_clean_image_filenames_mime_types' );
    ```

## 屏幕截图

 * [[
 * Easily choose between cleaning the filenames of all file types or images only.

## 安装

 1. Search for Clean Image Filenames in the plugins directory.
 2. Install and activate the plugin.

or

 1. Download and unzip the plugin and upload the `clean-image-filenames` directory 
    to your `/plugins/` directory.
 2. 通过 WordPress 的“插件”菜单以激活本插件。

## 常见问题

### Can this plugin convert filenames of existing files in the media library?

No, this plugin only cleans the filenames of files when they are being uploaded 
to the media library.

## 评价

![](https://secure.gravatar.com/avatar/4dc9905fa4c51c230189fda47f0b6476ec2c4924efc2dceacff3948ac0493b69?
s=60&d=retro&r=g)

### 󠀁[Works as expected](https://wordpress.org/support/topic/works-as-expected-796/)󠁿

 [Kuuak](https://profiles.wordpress.org/kuuak/) 2022 年 12 月 19 日

Works like indicated. Simple and efficient

![](https://secure.gravatar.com/avatar/0cb211878eae83e3a99a462153daa8b4f9b66dd383f2f8ed71e695c97f0fa5f3?
s=60&d=retro&r=g)

### 󠀁[Very Good Plugin](https://wordpress.org/support/topic/very-good-plugin-2477/)󠁿

 [novakpeter](https://profiles.wordpress.org/novakpeter/) 2022 年 6 月 7 日 1 回复

I recommend this. When there is diacritics in the file name, this simply substitutes
that for a letter without diacritics. Works very well!

![](https://secure.gravatar.com/avatar/90b2a8f9e91729393e1e2b96d259dc882b47924b6784d679bcb97092be3326dc?
s=60&d=retro&r=g)

### 󠀁[Bogus Plugin!](https://wordpress.org/support/topic/bogus-plugin-4/)󠁿

 [jitbd](https://profiles.wordpress.org/jitbd/) 2022 年 3 月 17 日 1 回复

This is completely a bogus plugin.

![](https://secure.gravatar.com/avatar/267ca5bcd9d560c6015007357761e8e72ebb097f03d2039aed9982a8fcc406cf?
s=60&d=retro&r=g)

### 󠀁[Made my Day](https://wordpress.org/support/topic/made-my-day-23/)󠁿

 [doomsoul](https://profiles.wordpress.org/doomsoul/) 2021 年 10 月 27 日 1 回复

Saves my life every day, German words just have to many Äs, Ös & Üs 😉

![](https://secure.gravatar.com/avatar/cb9358ffd8587c3498800d9c404ab24e3f8cf81596d7038125e10a65c76226de?
s=60&d=retro&r=g)

### 󠀁[Perfect for Danish sites 🙂](https://wordpress.org/support/topic/perfect-for-danish-sites/)󠁿

 [Bjarne Oldrup](https://profiles.wordpress.org/oldrup/) 2019 年 2 月 23 日 1 回复

In Denmark, we use the letters æ, ø, and å, which by danish standards, are translated
into ae, oe and aa when necessary. Many plugins similar to Clean Image Filenames,
fails to do that properly. That’s no catastrophe, its only media filenames after
all, but you might as well get it right if possible. Futhermore, titles are left
alone – that’s a big plus. So the title of a file called “Æblegrød.jpg” stays that
way, while the filename get converted to “aeblegroed.jpg”, just as I need it. Lastly,
this plugin, seems to be the only one of its kind, that has been tested with WordPress
5.1 – the others, while still working, seems abandoned. So – a big 5-star thank 
you from me. Bjarne

![](https://secure.gravatar.com/avatar/cb5e1d0f19055b2c444ae9ff624f270caae2f0287590ca1cfcc019c1976c26a7?
s=60&d=retro&r=g)

### 󠀁[Very good plugin](https://wordpress.org/support/topic/very-good-plugin-1385/)󠁿

 [miro382](https://profiles.wordpress.org/miro382/) 2019 年 2 月 9 日 1 回复

Perfect!

 [ 阅读所有21条评价 ](https://wordpress.org/support/plugin/clean-image-filenames/reviews/)

## 贡献者及开发者

「Clean Image Filenames」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Upperdog ](https://profiles.wordpress.org/upperdog/)
 *   [ Emil Gustafsson ](https://profiles.wordpress.org/gesen/)

「Clean Image Filenames」插件已被翻译至 10 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/clean-image-filenames/contributors)
为本插件所做的贡献。

[帮助将「Clean Image Filenames」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/clean-image-filenames)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/clean-image-filenames/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/clean-image-filenames/)，或通过[RSS](https://plugins.trac.wordpress.org/log/clean-image-filenames/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/clean-image-filenames/)。

## 更新日志

#### 1.5

 * Add support for WebP and AVIF image formats. Thanks to @vinkla for the pull request.

#### 1.4

 * Add support for cleaning filenames when sideloaded (usually when uploaded programmatically)
   using the wp_handle_sideload_prefilter hook.

#### 1.3

 * Rewrite cleaning function to better handle specific characters.
 * Make sure code is compliant with WordPress Coding Standards.

#### 1.2.1

 * Enable plugin to be translated/internationalization.

#### 1.2

 * Set original, un-cleaned filename as attachment title.

#### 1.1.1

 * Added uninstall script that deletes plugin settings when the plugin is uninstalled.

#### 1.1

 * Added plugin settings to media settings page with option to convert all file 
   types or just image file types.
 * Added shortcut to plugin settings from the plugins list.

#### 1.0

 * Initial release.

## 额外信息

 *  版本 **1.5**
 *  最后更新：**3 月前**
 *  活跃安装数量 **30,000+**
 *  WordPress 版本 ** 2.9 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  语言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/clean-image-filenames/) 、
   [Czech](https://cs.wordpress.org/plugins/clean-image-filenames/) 、 [English (US)](https://wordpress.org/plugins/clean-image-filenames/)、
   [French (France)](https://fr.wordpress.org/plugins/clean-image-filenames/) 、
   [German](https://de.wordpress.org/plugins/clean-image-filenames/) 、 [Latvian](https://lv.wordpress.org/plugins/clean-image-filenames/)、
   [Spanish (Chile)](https://cl.wordpress.org/plugins/clean-image-filenames/) 、
   [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/clean-image-filenames/)、
   [Spanish (Spain)](https://es.wordpress.org/plugins/clean-image-filenames/) 、
   [Spanish (Venezuela)](https://ve.wordpress.org/plugins/clean-image-filenames/)
   和 [Swedish](https://sv.wordpress.org/plugins/clean-image-filenames/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/clean-image-filenames)
 * 标签
 * [files](https://cn.wordpress.org/plugins/tags/files/)[images](https://cn.wordpress.org/plugins/tags/images/)
   [media](https://cn.wordpress.org/plugins/tags/media/)[sanitize](https://cn.wordpress.org/plugins/tags/sanitize/)
   [upload](https://cn.wordpress.org/plugins/tags/upload/)
 *  [高级视图](https://cn.wordpress.org/plugins/clean-image-filenames/advanced/)

## 评级

 4.6 星（最高 5 星）。

 *  [  18 条 5 星评价     ](https://wordpress.org/support/plugin/clean-image-filenames/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/clean-image-filenames/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/clean-image-filenames/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/clean-image-filenames/reviews/?filter=2)
 *  [  2 条 1 星评价     ](https://wordpress.org/support/plugin/clean-image-filenames/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/clean-image-filenames/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/clean-image-filenames/reviews/)

## 贡献者

 *   [ Upperdog ](https://profiles.wordpress.org/upperdog/)
 *   [ Emil Gustafsson ](https://profiles.wordpress.org/gesen/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/clean-image-filenames/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://paypal.me/gesen)