Features / Usability

Features / Usability

Image error "File is not an image." TW9.2

posts: 72 United States

Running TW9.2

Images uploaded to the Gallery since upgrade to 9.2 (from 8.1) will not display.

This worked fine before I upgraded, but now I get the error mesasge:
File is not an image.

I've tried it for .BMP, .JPG, .GIF, .PNG, and with IE and Firefox.

In IE, PNG, JPG, and GIF display the error mesasge: "File is not an image.", but the BMP is just a blank space; no error message or picture.

In Firefox, PNG, JPG, and GIF display the error mesasge: "File is not an image.", but the BMP is displayed.

A workaround is to find the file in the Gallery, go to Action(wrench)>Properties, and then manually specify the file type.

I can't have my users doing this every time they want to add an image to a wiki page.

Any one else having this issue? Any ideas for a fix?

posts: 72 United States

I just found this discussion thread about file type recognition and PHP fileinfo extension, and setting 'Validate upload file content' under security.

I'm running PHP Version 5.3.10. I checked my PHP files and I have the fileinfo extension: "C:\Program Files (x86)\PHP\v5.3\ext\php_fileinfo.dll"

I looked through my Admin home and did not see any options for 'Validate upload file content'.

When I run /tiki-check.php it shows fileinfo as "bad","not available","This fileinfo extension is needed for the 'Validate upload file content' preferance."

Any ideas why Tiki doesn't think I have the extension? Could this be why my filetypes are not recognized? How do I enable "Validate uploaded file content" in the security panel?

Based on the discussion linked above, I'm guessing I'm not the only one with this issue.

posts: 20 United States

For what it is worth, I have the same problem. I can upload a zip file in the gallery, but I get that error message and it can't display it.

I can circumvent this by editing the page as wiki text and then replacing "img" with "file"

That fixes it, so it seems to me that the file gallery is broken, doesn't detect the mime type even though the server does.

I'm using 11.1

posts: 72 United States

I ckecked my php.ini file and it does not list fileinfo.

From php.ini:

Is the fix as simple as adding extension=php_fileinfo.dll to the list, saving the file, and restarting my server?

Sorry is this is a noob question, but I'm new to php and don't want to mess anything up.

posts: 72 United States
In case anyone find this while searching, the fix noted above did work. Just needed to add extension=php_fileinfo.dll to the list and issue went away.

posts: 2

I encountered the same kind of difficulty.

The message "file is not an image" appeared when the extension is JPG instead of jpg, and when parameters are set in the plugin image in addition to the id parameter. My images are stored in Image Galleries