How to get the full path of the thumb file?

Hi all,

how to get the full path of the thumb?

 $cItem->myimage()->thumb(['width' => 300,'height'=> 200,'quality' => 80])->toFile()->url()

or passing the thumb as json?

json_encode($cItem->myimage()->thumb(['width' => 300,'height'=> 200,'quality' => 80])->html())

thx all

You are using a wrong order of methods, you first have to covert the field value to a file object before calling the thumb method. Additionally, you should use an if statement:

if ($file = $cItem->myimage()->toFile()) : 
 echo $file->thumb(['width' => 300,'height'=> 200,'quality' => 80])->url();
endif;

works! thanks alot!