Render image with picture and view_field_value

Created on 27 September 2016, almost 8 years ago
Updated 19 September 2023, 9 months ago

Hello,

I want use view_field_value and picture mappings to render images in specific templates.
But the image isn't rendered.
Here is my code

<?php
     $display_settings = array(
          'label' => 'hidden',
          'type' => 'picture',
          'settings' => array(
		'picture_mapping' => 'Background',
		'fallback_image_style' => 'content',
          ),
     );
     $output = field_view_field('taxonomy_term', $term, 'field_image', $display_settings);
     print render($output);
?>

Is it possible to define the "picture mapping" and the "fallback image" in the settings? In my code, if I delete the part 'settings' (with "picture_mappings" and "fallback image"), my image is rendered, but with a wrong picture mapping.

Thanks for your help !! ;)

πŸ’¬ Support request
Status

Closed: outdated

Version

2.13

Component

Code

Created by

πŸ‡«πŸ‡·France kumkum29

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom lesleyfernandes

    I am closing all very old tickets that have not received comments for a long time. If someone is still facing these issues, please reopen it. Feel free to contribute with more info or a patch.

Production build 0.69.0 2024