Title: No thumbnail, text instead
Last modified: August 24, 2016

---

# No thumbnail, text instead

 *  Resolved [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/)
 * When I activated this plugin and uploaded a file to the media library something
   went wrong. Instead of a thumbnail and a working image all I got was text instead(
   the filename of the image is shown as text where the thumbnail should be).
 * Using WP 4.1.2. I have not tried to debug this by inactivate all other plugins(
   yet, anyway).
 * [https://wordpress.org/plugins/clean-image-filenames/](https://wordpress.org/plugins/clean-image-filenames/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Contributor [Emil Gustafsson](https://wordpress.org/support/users/gesen/)
 * (@gesen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048212)
 * What happens if you deactivate the Clean Image Filenames plugin and upload the
   same file?
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048213)
 * Then it works.
 * I uploaded the same file (with a filename that contained a Swedish “å”) four 
   times, alternating the activation of Clean Image Filenames. Both times it was
   active I got the same result.
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048216)
 * Maybe it had something to do with the fact that I’ve already uploaded the file
   before trying Clean Image Filenames? Is WordPress smart enough to try to use 
   the previous image? I’ll investigate… 🙂
 *  Plugin Contributor [Emil Gustafsson](https://wordpress.org/support/users/gesen/)
 * (@gesen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048218)
 * No, WordPress will upload the file as a new one and rename the filename adding
   1 at the end and the Clean Image Filenames plugin takes this into consideration.
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048239)
 * Ah, I see that now.
 * My file name was `File Name test – åäÖ.jpg` and the images on the server becomes`
   file-name-test-a%cc%8aa%cc%88o%cc%88.jpg` which results in a 404 when I try to
   access it.
 * I’d rather see that the file name was transliterated to `File Name test – aaO.
   jpg` (or even better, `file-name-test---aao.jpg`).
 *  Plugin Contributor [Emil Gustafsson](https://wordpress.org/support/users/gesen/)
 * (@gesen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048252)
 * The plugin is supposed to translate the filenames into aao not a%cc%8aa%cc%88o%
   cc%88 or anything like that. It uses a core WordPress function, called sanitize_title(),
   to do the translation. It’s the same function that translates a post title into
   the slug.
 * Are you running your own server or where are you hosting the site?
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048258)
 * Yeah, I guessed it was supposed to work like that. I’ve tried other plugins (
   Clean Filenames, Filenames to latin) and had problems with them as well. So maybe
   it has something to do with my setup. My site is hosted at a Swedish web hosting
   company ([https://fsdata.se/](https://fsdata.se/)) but not open to the public(
   just a test site).
 *  Plugin Contributor [Emil Gustafsson](https://wordpress.org/support/users/gesen/)
 * (@gesen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048259)
 * Alright, might be some missing locales on the server or something like that.
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048296)
 * Maybe… if I run `locale -a` on the server I do get a lot of locales, like `sv_SE`
   and `sv_SE.utf8`. But I’m not completely familiar with this, maybe that doesn’t
   mean they are available for PHP?
 * It’s odd though, if I just use the `clean_filename()` function from the plugin(
   like, in a template) and run it like this:
 *     ```
       function clean_filename($file) {
   
       	$path = pathinfo($file['name']);
       	$new_filename = preg_replace('/.' . $path['extension'] . '$/', '', $file['name']);
       	$file['name'] = sanitize_title($new_filename) . '.' . $path['extension'];
   
       	return $file;
       }
   
       $file = clean_filename( array( "name" => "Test av filnamn – åäÖ.jpg" ) );
       echo $file[ 'name' ];
       ```
   
 * The output is the expected `test-av-filnamn-aao.jpg`.
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048356)
 * So it seems like files in my Finder (OS X) uses odd characters (multibyte?) even
   though it looks like åäö. Maybe it’s actually something related to the file names
   on my computer and has nothing to do with WordPress, plugins or server environment
   at all. Very weird.
 * Anyway, sorry to bother, and thanks for the quick feedback!
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048358)
 * I’m gonna mark this as resolved since I don’t think it’s anything wrong with 
   this plugin.
 *  Plugin Contributor [Emil Gustafsson](https://wordpress.org/support/users/gesen/)
 * (@gesen)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048361)
 * No worries! Glad to help!
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048371)
 * Actually it is only present in Firefox. Works as expected in both Safari and 
   Chrome.
 * If I understand it correctly then other browsers are handling OS X filenames 
   characters in a different way. I found this for example: [ Unconventional normalization form for uploaded filename on OSX](https://bugzilla.mozilla.org/show_bug.cgi?id=968142).
 * So, that was my afternoon… :/
 * Anyway, I’ve now learned that filename cleaning of characters like åäö won’t 
   work if files are uploaded with Firefox on OS X. (Not even the postprocessing
   in Media File Renamer worked on these files.)
 * I’m curious though if it would be possible to handle this in code in a plugin,
   but the world of character encoding is a world I rather stay away from… 🙂

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘No thumbnail, text instead’ is closed to new replies.

 * ![](https://ps.w.org/clean-image-filenames/assets/icon-256x256.png?rev=1001365)
 * [Clean Image Filenames](https://wordpress.org/plugins/clean-image-filenames/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/clean-image-filenames/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/clean-image-filenames/)
 * [Active Topics](https://wordpress.org/support/plugin/clean-image-filenames/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/clean-image-filenames/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/clean-image-filenames/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [AdrianB](https://wordpress.org/support/users/adrianb/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/no-thumbnail-text-instead/#post-6048371)
 * Status: resolved