$field && is_array($node->$field) && count($node->$field)); } function _jcarousel_block_preprocess_images(&$variables) { $variables['imagefield_type'] = 'imagefield'; $node = $variables['node']; $field_name = $variables['field']; foreach ($node->$field_name as $key => $image) { $thumb_path = imagefield_file_admin_thumb_path($image); list($width, $height, $type, $image_attributes) = @getimagesize($thumb_path); $formatted_image = array(); $formatted_image['path'] = '/'. $image['filepath']; $formatted_image['thumb_path'] = '/'. $thumb_path; $formatted_image['rel'] = $variables['image_rel']; $formatted_image['width'] = $width; $formatted_image['height'] = $height; $formatted_image['alt'] = ''; // todo $variables['images'][] = $formatted_image; } }