Support » Plugin: Toolset Types » Can't display image in a template
5 years, 1 month ago
I’ve created an image field with the plugin and now I’m confused how to display that image in a template I’ve tried the following without much success:
$img = types_render_field("wpcf-people_photo", array("alt"=> "Profile image",
"size" => "image-custom-size-name"));
This doesn’t do anything. I would really appreciate if you could give an example of how to display an image of a registered image size.
Here’s the API page that explains about arguments for the image field:
The function types_render_field already echos. You shouldn’t echo additionally.