Skip to content

Instantly share code, notes, and snippets.

@drfeld
drfeld / gist:67e478a3e88fd9a9b612
Last active June 30, 2016 05:01
Drupal: Render a picture mapping programmatically
<?php
$picture = field_view_field('node', $node, '[IMAGE FIELD MACHINE NAME GOES HERE]', array(
'label' => 'hidden',
'type' => 'picture',
'settings' => array(
'picture_group' => '[PICTURE MAPPING MACHINE NAME GOES HERE]',
'fallback_image_style' => '[IMAGE STYLE MACHINE NAME GOES HERE]',
'image_link' =>'')));