Fantastic Module and it works great however I'm trying to print the output straight from a .tpl file, like you can do with Image Styles.

This how I do it with Image Styles:
<img src="<?php print image_style_url('resp_img__team_member', $team[$idx]->field_team_image['und']['0']['uri']); ?>" />

I've searched but can't seem to find if anyone is/has done this. Any help would be appreciated!

Thanks.

Comments

attiks’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev

Why don't you just render the field using drupal_render.

If you want to do it for an image not attached to a node you need to use something like this

print theme('picture_formatter', array(
'breakpoints' => array(),
'item' => array(),
'style_name' => '',
'path' => '',
));

The easiest is to add dpm($variables) after line 314 so you'll see what you have to pass as arguments.

jeffglenn’s picture

Yeah, you're completely right. I just wasn't thinking straight...

I used:
<?php print render($content['field_team_image']); ?>
and it works perfectly.

Thanks

jeffglenn’s picture

Status: Active » Closed (fixed)
jeffglenn’s picture

Issue summary: View changes

Wrapped my code in code tags