In a content type have a field image upload.its image upload type is jpg,png,gif. When we upload these image type of images an error is coming :

The selected file Chrysanthemum.jpg could not be uploaded. The file is not a known image format.

But its running in local not in server. What is the problem ? Please help me. Thanks

2 Answers 2


Below are the two ways. I hope help you to solve your issue.

1. Your files via FTP into the image_import directory aren't being given the correct permissions. You have to provide the permission i.e. chmod 660 * on them in the image_import directory the files were recognized correctly and the import worked.


2. In /includes/image.inc, change line 117 from:

  if (!is_file($file)) {


if (!is_file($file) && !is_uploaded_file($file)) {

Then check is your issue is solved or not. If not then try once updating below with second way :

On the admin/settings/file-system, try changing C:\WINDOWS\Temp to sites/default/files/temp (also made sure it was writeable by the web server).


Have you tried with other images? Do you get the same error with other .jpg files? Or .gif files? Perhaps Chrysanthemum.jpg is a corrupt file.

Can you upload other files? Are /tmp permissions set correctly?

If so, it could be a PHP issue, and not a Drupal issue. Check whether the FileInfo module is installed:

pecl install fileinfo

Or if you run Apache, check if the libjpeg.so module is enabled.

  • i tried but got same error. Commented Jun 8, 2015 at 8:50
  • I amended my answer with more detail, see if that helps.
    – Wouter
    Commented Jun 9, 2015 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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