Clean Image Filenames

説明

Filenames with special characters or language accent characters, like Château de Ferrières.jpg and smörgåsbord.png, can sometimes be a problem for browsers or servers. This plugin takes care of that and cleans the filenames of files uploaded to the WordPress media library.

This plugin cleans the filenames from special characters like exclamation marks, periods, and commas and accent characters like Swedish and German umlauts. Special characters are remove, accent characters are converted to their non-accent equivalent, and blank spaces are converted into dashes.

Easily set the plugin to clean the filenames of images only or all files uploaded to the media library. Developers can take advantage of the built in filter to get really specific about what file types to clean the filenames of.

機能について

  • Can be used for all file types, not only images
  • Multisite compatible
  • Works with custom upload_dir setups
  • Doesn’t alter your database or uploads settings
  • Gutenberg ready

Plugin filter for developers

Developers can get really specific about what file types to clean by using the clean_image_filenames_mime_types filter in their plugins or themes. When using this filter, settings saved through the settings page are overridden. For a complete list of mime types, see Wikipedia.

The following example would make the plugin clean the filenames for 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 files or images only.

インストール

  1. Upload the clean-image-filenames directory to the /wp-content/plugins/ directory.
  2. 「プラグイン」メニューからプラグインを有効化します。

FAQ

Why does this plugin exist?

No matter how hard you try to teach people to name their files in a certain way before uploading, sooner or later you will end up with a media library with filenames like Château de Ferrières.jpg or Smörgåsbord.png. Sometimes browsers have a hard time displaying images with filenames like these and the images end up broken.

Can this plugin clean the 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.

評価

Perfect for Danish sites 🙂

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

Very, very good!

Especially for clients that don´t understand the process of Image naming. Saves you a TON of time!
17件のレビューをすべて表示

貢献者と開発者

Clean Image Filenames はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Clean Image Filenames” は4ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Clean Image Filenames” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

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

  • 最初のリリース。