Clean Image Filenames

Descripción

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.

Funcionalidades

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

Capturas

  • Elige con facilidad entre limpiar los nombres de todos los tipos de archivo o solo de imágenes.

Instalación

  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. Activa el plugin desde el menú ‘Plugins’ de WordPress.

Preguntas frecuentes

¿Puede este plugin convertir los nombres de los archivos existentes en la biblioteca de medios?

No, este plugin sólo limpia los nombres de archivo de los archivos cuando se están subiendo a la biblioteca de medios.

Reseñas

7 de junio de 2022 1 respuesta
I recommend this. When there is diacritics in the file name, this simply substitutes that for a letter without diacritics. Works very well!
27 de octubre de 2021 1 respuesta
Saves my life every day, German words just have to many Äs, Ös & Üs 😉
23 de febrero de 2019 1 respuesta
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
Leer todas las 21 reseñas

Colaboradores y desarrolladores

Este software es de código abierto. Las siguientes personas han contribuido a este plugin.

Colaboradores

"Clean Image Filenames" ha sido traducido a 9 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce "Clean Image Filenames" a tu idioma.

¿Interesado en el desarrollo?

Revisa el código, echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

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

  • Permite la traducción/internacionalización del plugin.

1.2

  • Establece el nombre de archivo original, sin limpiar, como título del adjunto.

1.1.1

  • Añadido script de desinstalación que elimina la configuración del plugin al desinstalarlo.

1.1

  • Añadida página de configuración del plugin a la página de ajustes de medios con la opción de convertir todos los tipos de archivo o sólo los tipos de archivo de imagen.
  • Añadido atajo a la configuración del plugin en la lista de plugins.

1.0

  • Versión inicial.