I'm hoping someone can provide me with some guidance. The following code works to obtain the filepath to the original file, uploaded using CCK Imagefield + Imagecache.

However, I need to obtain the path to the Imagecache thumbnail - rather than the original file.

Any help in this would be greatly appreciated.

function image_get_thumbnails($nid){

	if (module_exists('imagefield')){
	$SQL = "SELECT * FROM node, files, content_field_image 
	WHERE node.nid = %d AND node.nid = content_field_image.nid AND files.fid = content_field_image.field_image_fid
	ORDER BY node.nid ASC, content_field_image.delta ASC
		";
		$result = db_query($SQL,$nid);
		while ($record = db_fetch_object($result)){
			$images[] = $record->filepath;
		};
	
		if (count($images) > 0){
			return $images;
		}else{
			return false;
		};
	}else{
		return false;
	};
}

Comments

fizk’s picture

Status: Active » Closed (fixed)

Please reopen if this is still an issue with ImageCache 6.x-2.0-rc1.