Hi,
i just want to display a image with views.
I created a new content type with one cck field "file".
I added this field in my view and select format "Image" ('file_image_image').
When i call my view the image is never diplayed, only the text "no image". -> file_cck.module near
line 350. With a other format like Preview it workes fine.

....
$image = isset($image) ? $image : t('no image');
...

I think the first problem is in the handler settings for "file_image_image". Is set in file_image.module near line 130 ->

....
 return array_merge($handlers, array(
    'file_image_image' => array(
      'name' => t('Image'),
      'dimensions' => '5x5',
      'weight' => 1,
    ),
...

I changed the dimensions to something like 5000x5000 (bigger dimensions as the original file i've uploaded). Then my Image is diplayed. But this cant be the real solution. Maybe the problem itself
is in file.inc. line 1349

org code:

...
  if ($width > 0 && $width < $dimensions[0] && $height > 0 && $height < $dimensions[1])
...

changed to:

...
if (($width > 0 && $width < $dimensions[0] && $height > 0 && $height < $dimensions[1]) || ($dimensions[0] == 0 && $dimensions[1] == 0 && $width > 0 && $height > 0))
...

if we have not set any dimensions in the handler then the image is passed too.
With that i can remove dimensions settings in file_image_image.

Comments

johanneshahn’s picture

Status: Active » Closed (fixed)