I cannot get my imagecache custom actions to work at all?

When returning $image in any way, it gives me an error, which can be resolved by adding in the first line here:

if (!$image_context['entity']) { return 'No referring entity'; }
$image->ops[0] = "-resize 1600x1600";
return $image;

That should simply just resize my images now?

Essentially, my end goal is to check the value of a field submitted with the node which also submitted the original image, and then based on its value, apply a watermark. I am just toying about with custom PHP right now... but I can't seem to get any custom actions to work right now... Any help would be great, thanks! :D

1 Answer 1


Juste return "TRUE", not "$image", It is works for me.

 $image->ops[] = "-resize 1600x1600";
 return TRUE;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.