Error when uploading image files

I just got Omeka 1.2.1 installed on an Ubuntu server and it appears to be working fine, except when I go to upload a .jpeg or .png file to an item. I receive the following error:

"Something went wrong with image creation. Please notify an administrator."

I have already tried the following options:
-I have changed my max file size and post size in my php.ini
-tested the ImageMagick path in the settings -- it appears to be working fine
-I have tried uploading other file types (e.g. PDF) and they have worked fine.
- I have ensured that JPEG files were in the allowed file extensions and the proper mime types are in the allowed file extensions.

Any idea what might be happening?

Any and all help would be much appreciated.

Thank you,

Roger

Also,

I enabled my error logs and got the following errors, that might provide some clue (although I can't make any sense of them)"

"
2010-10-27T15:28:09-03:00 DEBUG (7): Could not retrieve element text for the element named "IPTC Array"
2010-10-27T15:28:09-03:00 DEBUG (7): Could not retrieve element text for the element named "IPTC String"

Thanks,

Roger

Have you checked other forum topics related to Image Magick? The person in this string below seemed to have the similar issues:

http://omeka.org/forums/topic/imagemagick-directory-path-amp-image-derivative-generation-fails

Thanks, Sheila.

I tried following the solution that was outlined in that forum posted that you pointed out. (I installed the two image libraries mentioned and reinstalled ImageMagick)

However, I am still getting the same errors, both in the administrative interface in Omeka, and in my error log.

.gif images upload, just fine it seems, it's just .jpeg and .png images that don't seem to work.

Any other suggestions?

Thanks,

Roger

I had this message for files with names containing spaces and diacritics, like "my file with àà.png". Renaming to "myfilewithaa.png" did the trick : might be worth a try...

Hi,

Thanks for your suggestion. Unfortunately, it didn't work. My file names didn't include any foreign characters and I tried renaming them to really simple file names, but I still got the same error.

Thanks anyways.

Have you tried this: change the security settings--in the admin/setting panel-- and be sure to uncheck the box next to "Disable File Upload Validation."

I tried that too, Sheila, but I still get the same error. Thanks though.

I have also had the OP's problem. I am using my own install on my own server, and I have tried the same things as the original poster.

In addition, I uploaded an image file to an omeka.net site, and it worked fine. When I tried to upload the same file to MY page, it did not work, but gave me the same error message as the OP. The most frustrating part is that the images I attempt to upload DO show up in the files on my server (/archive/file etc.).

One thing that might be behind my problem: I have omeka installed in a subfolder on my server. perhaps the problem lies in the paths somewhere in the code? The problem with this approach is that like the OP, when I upload a .pdf or a .docx file, it uploads just fine.

Let me try to clear up some of the confusion here.

When you see the "Something went wrong with image creation" message, Omeka is saying that it tried to create derivative images (thumbnails) from the image you uploaded, and it failed for some reason.

Omeka doesn't try to create thumbnails out of non-image files, so .pdf, .docx and other similar formats will be unaffected. Also, any changes to the allowed file formats list or the "Disable File Upload Validation" checkbox will not affect this problem.

One problem you may be having is that it's possible to install a copy of ImageMagick that doesn't support all the common image file formats, which is why you may be seeing errors for some images but not others.

So we can get some more information, can you try to run and post the results of the following command (you'll need to SSH into the web host that you have Omeka installed on to do this):

convert identify -list format | grep -E 'GIF\*|JPG\*|PNG\*'

This will cause ImageMagick to print a list of what image formats it supports (specifcally the GIF, JPEG and PNG portions of that list).

Thanks for clarifying.

I got the following output when I typed the command you mentioned into my host's terminal:

GIF* GIF rw+ CompuServe graphics interchange format

This would lead me to believe that ImageMagick is currently set up to support GIF? How would I go about enabling support for JPEG and PNG formats?

Thanks very much.

Yes, you're basically correct in reading that output.

For example, here's what I get running that same command:

GIF* GIF       rw+   CompuServe graphics interchange format
JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format (80)
PNG* PNG       rw-   Portable Network Graphics (libpng 1.2.44)

If you're using shared hosting, you'll probably need to ask your web host to reinstall ImageMagick with JPEG and PNG support enabled.

If you're on a system you control more directly, you can reinstall ImageMagick from your package manager (something like apt-get on Ubuntu), or you can use one of the pre-built packages ImageMagick offers on their website at http://www.imagemagick.org/script/binary-releases.php

Thanks very much!

It worked. I reinstalled ImageMagick and was then able to upload JPEG images.

Another peculiar thing that I noted as well: in the settings in Omeka, the ImageMagick path was set to "usr/local/bin" I had to change it to "usr/bin" in order for . When I clicked the "test" button in the settings, both showed the "Works" text. However, only when I set the path to "usr/bin" was I permitted to upload JPEG files.

Glad to hear it's working for you!

As to the ImageMagick path test, the specific wording there can be a little bit misleading.

When you click the Test button and Omeka responds "Works", it only checks to see if the path you entered contains a program called "convert", which is ImageMagick.

Omeka doesn't check what formats that particular copy of "convert" supports when you click the Test button, it assumes that ImageMagick will always support the common web image formats. It seems you must have a situation where you have two copies of ImageMagick, one in /usr/bin which has the usual features, and another in /usr/local/bin which only supports GIF for some reason.

You're exactly right. I originally installed ImageMagick from source rather than through the synaptic package manager on Ubuntu (which would have allowed me to avoid this problem in the first place). This would explain why the multiple /usr/ paths occurred in my case.

Thanks again! Can't wait to delve more into Omeka - such a wonderful platform!