This problem caused me a great deal of frustration until I finally figured out what the problem was.
When creating new content with an Image field, there are some images that simply refuse to make it through the entire upload process. Here's what I mean:
- I create a new content with any content type that has an Image field.
- I give it a title and add tags.
- I may or may not add the body text yet--it doesn't matter.
- I click Browse in the Image section and select an image--could be JPG, or PNG.
- I click the Upload button--the progress indicator rotates and then disappears.
- There is no image loaded and, therefore, no thumbnail.
This will happen if ANY of the images won't upload. For example, if I upload just the one "bad" image then it won't upload. If I select multiple images (using the Multiload module) and there is one "bad" image, none will upload.
If I repeat the process with one or all "good" images, they will all upload just fine and the thumbnails appear as expected.
At one point, I received an error telling me that there was a duplicate key in the "file_managed" table when I tried to upload the "bad" image again. When I looked at the raw table data, sure enough the single or multiple uploads with a "bad" image in the group were indeed listed but with a status of 0. When I checked the .../sites/default/files folder, the images were actually there. I'm not sure what happens after that but the images never made it to the Image field of the content being created.
I tried renaming the "bad" image but that didn't make any difference. I converted the "bad" image to PNG and it was still "bad". I previewed the "bad" image in full screen mode on my computer and did a Print Screen then saved the image to file. This screen captured image now becomes a "good" image. It should be noted that "bad" images work fine in every program on my computer.
All the images I use on my site began life as photographic negatives or slides scanned at 2400 DPI and saved as JPG by the scanning software. (Same scanning software for all images.) The images are between 4MB and 10MB when scanned. I then resize all the images to maximum 300 DPI and 1920 horizontal or 1600 vertical pixels depending on the orientation. This brings the size below 1 MB. All images are processed using Corel Paint Shop Pro Photo X4. 99% of the images are "good" and there are just a few that are "bad". PSP X4 was also used to save the screen capture of the "bad" image as a JPG which was now "good".
The Image fields of all content types is set to maximum size of 1920 x 1600 and with everything else as default. As mentioned, Widget can be either Image or Multiload with the same results.
To fix the problem, I need to delete the entries for the "bad" images from the file_managed table and delete them from the .../sites/default/files folder. Then, I have to screen capture the original image and save it again.
The question here is why are there some images that just won't get through the full process when all the others will?
I have attached three images to this report. Bad .jpg is an original "bad" image. GoodBad.jpg is the screen capture of the "bad" image which is now "good". Good.jpg which is an image in the same group that was always "good". Maybe you can see what what makes an image "bad" and perhaps this needs to be a fix.
Attachment | Size | Status | Test result | Operations |
---|---|---|---|---|
Bad.jpg | 303.65 KB | Ignored: Check issue status. | None | None |
Good.jpg | 400.19 KB | Ignored: Check issue status. | None | None |
GoodBad.jpg | 131.93 KB | Ignored: Check issue status. | None | None |