I have a problem image file names containing utf-8 characters in my drupal website. When drupal has to display a thumbnail (image style) that contains utf-8 characters on it's image file, it fails. All other images/image file names, work ok.

For example there's this image:


The actual image file really exists in default/files/styles/thumbnail/public/ directory, but it cannot be displayed in website.

Visiting the above image url, I can see the following message:

Error generating image.

but I should be able to see the actual image, because it exists on server directory, I can download it using FTP, and it's a normal thumbnail image file.

Why is this happening and what can I do to fix it?



sample image

  • Out of curiosity, could you upload example image file somewhere and share? I'd like to see this in my Drupal install :) – Mołot Jan 23 '15 at 9:34
  • Apache Version: 2.2.29, PHP Version: 5.3.29, MySQL Version: 5.5.40-cll, Operating System: linux – ktsixit Jan 23 '15 at 9:37
  • I'll update the question and attach the .htaccess file there. – ktsixit Jan 23 '15 at 9:37
  • @Mołot I uploaded an image and posted the link in question. The original file name contained greek characters but that's how it's stored on server. – ktsixit Jan 23 '15 at 12:55

Use https://www.drupal.org/project/transliteration to automatically rename the files and avoiding problems like this. No need to train your editors. :-)

  • Good workaround. Too bad it's still needed. Back in 2007 when it was released, UTF support was not something expected from hosting companies. Now in 2015 I'd love to believe it's the usual thing up there. – Mołot Jan 23 '15 at 9:34
  • thank you. I'll try Transliteration module, and see how it works with existing image files. – ktsixit Jan 23 '15 at 9:49
  • unfortunately the module didn't work as expected. It skipped most of the image files, with the following error "Not all file names could be converted. The following files could not be accessed and have been ignored". But images exist and have proper file permissions. – ktsixit Jan 23 '15 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.