Clean Image Filenames

Clean Image Filenames Install Statistics

36
131.03%
Today: 152 Yesterday: 116 All-time: 248,820 downloads
Clean Image Filenames Icon

Try plugin: Clean Image Filenames

We'll create fresh WordPress site with Clean Image Filenames installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About Clean Image Filenames

This plugin automatically converts language accent characters to non-accent characters in filenames when uploading to the media library.

18


1


0


0


2

updated: 9 months ago
since: 10 years ago
author: Upperdog

Description

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

  • 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.

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