I wanted my previews to be the default value of "Image size: Original", so I didn't change the value after I activated the module. However, the previews didn't work. Looking at the src attribute in the img tag in the HTML I saw that only part of the path leading up the image file was present: /site/default/files. The file name itself and its immediate parent directory 'images' was not present. Also the Height and Width attributes were set to empty strings: "".

I am not experienced enough in Drupal to trace it all the way back. The closest I could get was line 124 in images.previewlist.inc:
$image = $node_image->images[$image_node_types['image']['image_selection']];
It seemed clear that this line was not successfully getting an image file name, presumably because $image_node_types['image']['image_selection'] was not really populated correctly as the image nodes themselves seemed fine. I replaced the alt attribute in the img creation code on line 142 with
alt="' .$image. '"
and it came up as an empty string.

I see line 13 in image_fupload.install
'image_selection' => IMAGE_PREVIEW, // best choice I think; can be changed in admin menu
that appears to set the value at install time but I can't find the definition of IMAGE_PREVIEW

Once I changed the setting to Thumbnail and then back to Original, I started getting working previews. But it was about 2 hours of head scratching before I thought to do that.

Anyway, great module! I think this will really encourage users to send up their photos of or events!

Comments

grandcat’s picture

Status: Active » Fixed

OK, thank you very much for your detailed report =)

I see line 13 in image_fupload.install
'image_selection' => IMAGE_PREVIEW, // best choice I think; can be changed in admin menu
that appears to set the value at install time but I can't find the definition of IMAGE_PREVIEW

Yes, the value is set at install time but probably, IMAGE_PREVIEW is not defined during install period, only during runtime. So, I will replace the constant by a normal string: 'preview'.

BUG fixed in CVS HEAD. Thank you =D

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.