Makes three tasks for getting cleaner and safe to use filenames
- Removes or replace special/international characters that can make your filenames not compliant with servers that don’t have support for international locales and filenames, or third-party services. (e.g. ‘España.png’ will become ‘Espana.png’, ‘prüfen’ will become ‘prufen’).
- Replaces any ‘+’ in the filename with ‘-‘ (e.g. ‘A+nice+picture.png’ will become ‘A-nice-picture.png’).
- Replaces any ‘.’ character before the one used for file extension with ‘-‘(e.g. ‘A.nice.picture.png’ will become ‘A-nice-picture.png’).
- After running all character replacement filters, a filter is applied to ensure that the filename only contains letters, numbers, underscores, dashes, and dots. Any other character will be removed from the filename.
- And finally all letters in the filename are set to lowercase to prevent issues with case insensitive systems.
This reduces problems with some servers, services, plugins… That may have problems handling filenames with special or international characters.
The plugin does his job during file upload process, so it’ll change only filenames for files being uploaded after plugin activation.
It supports characters from belarusian, cyrillic alphabet, czech, german, hebrew, hungarian, russian, polish, spanish, ukrainian, and some other special characters (e.g. №, @, $, etc.)
- WordPress 3.0 or higher
- Simply install from your WP dashboard or upload it using FTP, and install. No configuration needed.
- Will change filenames for files uploaded beftore activating the plugin?
No. The plugin does his job just after a file is uploaded and before it’s saved to your server, so it’ll change only filenames for files being uploaded after plugin activation.
Very good character replacements (ä->a, …) and to be safe a final filtering of the filename to prevent unwanted (and unknown) characters from being used.
I tried a few plugins of this type, and this is definately the best.
Fix issues with some weird plugins and their stupid developers. Work as described except spaces in filename. The plugin just don’t handle it correctly.
Contributors & Developers
“Clean Filenames” is open source software. The following people have contributed to this plugin.Contributors
- Fixed bug introduced in 1.0.9. Thanks to Edu from etmsoft for reporting it.
- Added: All letters in the filename are set to lowercase to prevent issues with case insensitive systems.
- Added support for Hebrew (letters will be replaced, puntuation and ligatures will be removed). e.g. ‘א’ will be replaced by ‘a’, and ‘װ’ will be removed from the filename.
- After running all character replacement filters, a last filter is applied to ensure that the filename only contains letters, numbers, underscores, dashes, and dots. Any other character will be removed from the filename.
- Plugin name changed from Sanitize Spanish Filenames to Clean Filenames to better reflect actual purpose of the plugin (originally it was created only for spanish characters).
- Changed readme content and language.
- Added: Replaces any ‘.’ character in the filename except for last one (for file extension) with ‘-‘.
- Added: Replaces any ‘+’ in the filename with ‘-‘.
- Many more characters and some symbols added. Cleaning not only spanish characters but from other languages too.
- Fixed a little bug that causes ‘º’ replaced by ‘a’ instead of ‘o’, and same problem for ‘ª’.
- Added characters ü Ü º ª that will be replaced with u U o a
- Initial release.