Discover, trust, install: FAIR 1.0 is here

Plugin Banner

Clean Image Filenames

by Upperdog

Version: 1.5

Download
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' );
  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. Activate the plugin through the ‘Plugins’ menu in WordPress.
  1. Easily choose between cleaning the filenames of all file types or images only.

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

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.

Works as expected

By Kuuak on December 19, 2022

Works like indicated. Simple and efficient

Very Good Plugin

By novakpeter on June 7, 2022

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

Bogus Plugin!

By jitbd on March 17, 2022

This is completely a bogus plugin.

Made my Day

By doomsoul on October 27, 2021

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

Perfect for Danish sites 🙂

By Bjarne Oldrup (oldrup) on February 23, 2019

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 good plugin

By miro382 on February 9, 2019

Perfect!

Must have for every site. Excellent!

By hexcross on December 18, 2018

Must have for every site. Excellent!

No Doc, not clue where this plugin is to scan files

By wireB on October 25, 2018

Basic 101, how to present a plugin. You give instruction within the Dashboard and or the WordPress plugin site.

Does what it says

By felixprojekt on December 1, 2018

Using it happily on many websites without any issue.

Very, very good!

By digtialv on March 13, 2018

Especially for clients that don´t understand the process of Image naming. Saves you a TON of time!

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.
  • Version:Version: 1.5
  • Active installs:Active installs: 40K
  • Last updated:Last updated: 05-06-2024
  • Requires:Requires: 2.9
  • Tested:Tested: 6.6.2
Average rating:4.6 out of 5 stars.
  • Number of ratings: 18 ratings
  • Number of ratings: 1 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 2 ratings
Back to top