Render picture module image in a custom module I am trying to render a responsive picture module image from within a module. I cant find any functions that I can pass the picture mapping into.
If I render the whole node from within the module it works fine but if I just render the image it does not work.
Any thoughts would be great.
Here is my solution to build the render array of the drupal 7 picture module v2

//Load picture renderable array

$picture_name = 'mapping_name'
$fallback_image_style = 'large';

$image = $node-&gt;field_image[LANGUAGE_NONE][0];

$picture_mappings = picture_mapping_load($picture_name);

$breakpoint_styles = picture_get_mapping_breakpoints($picture_mappings, $fallback_image_style);

$picture = array(
        '#theme' =&gt; 'picture',
        '#width' =&gt; isset($image['width']) ? $image['width'] : NULL,
        '#height' =&gt; isset($image['height']) ? $image['height'] : NULL,
        '#style_name' =&gt; $fallback_image_style,
        '#breakpoints' =&gt; $breakpoint_styles,
        '#uri' =&gt; $image['uri'],
        '#alt' =&gt; isset($image['alt']) ? $image['alt'] : '',
        '#attributes' =&gt; isset($image['attributes']) ? $image['attributes'] : NULL,
        '#timestamp' =&gt; $image['timestamp'],
      );

print render($picture);