Clean Image Filenames

Wordpress Plugin
Download latest - 1.3

Developers

Upperdog

Download Stats

Today 58
Yesterday 94
Last Week 495
All Time 36,037
Banner 772x250

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.

Features

  • 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

  • Rksmrgs.jpg raksmorgas.jpg
  • blegrd_FTW!.gif aeblegrod-ftw.gif
  • Chteau de Ferrires.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.

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' );

Releases (6 )

Version Release Date Change Log
1.3 2020-10-12
  • Rewrite cleaning function to better handle specific characters.
  • Make sure code is compliant with WordPress Coding Standards.
1.2.1 2018-03-02
  • Enable plugin to be translated/internationalization.
1.2 2018-02-19
  • Set original, un-cleaned filename as attachment title.
1.1.1 2017-10-31
  • Added uninstall script that deletes plugin settings when the plugin is uninstalled.
1.1 2014-12-14
  • 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 2014-11-27
  • Initial release.