sandywp / plugins / clean-image-filenames

Clean Image Filenames

4.6 out of 5 stars. 4.6 21 reviews

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

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v1.5 30,000+ installs WP 2.9+

your-sandbox.sandywp.com/wp-admin
Clean Image Filenames running inside a SandyWP sandbox

What you get inside

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

About this plugin

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

Questions

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.

4.6

21 reviews

  • 5 ★ 18
  • 4 ★ 1
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 2

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

  • Media Cleaner: Clean your WordPress!

    4.6 · 90K+ installs

    Clean your WordPress! Eliminate unused and broken media files. For a faster, and better website.

  • File Upload Types by WPForms

    4.0 · 40K+ installs

    Easily allow WordPress to accept and upload any file type extension or MIME type, including custom file types.

  • File Manager

    4.3 · 10K+ installs

    Manage WordPress files and folders from your dashboard with a built-in code editor: upload, edit, delete, move, rename, and…

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.