Last active
December 6, 2018 22:54
-
-
Save claudiainbytes/d9c9d84fa16d4afcf488086711082e98 to your computer and use it in GitHub Desktop.
Revisions
-
claudiainbytes revised this gist
Dec 6, 2018 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,3 +16,8 @@ #And this module Twig Field https://www.drupal.org/project/twig_field_value <img src="{{ node.field_image.entity.uri.value | image_style('despliegue_1366x768_px') }}" alt="{{ node.field_image.alt }}"/> # Example 3 <img class="img-responsive" src="{{ content.field_imagen.0['#item'].entity.uri.value | image_style('minuto_a_minuto_560x315_px') }}" alt="{{ content.field_imagen['#items'].alt }}"/> -
claudiainbytes created this gist
Dec 6, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # Example 1. <div class="col-md-8 blog--caja-right"> {% set imageblog = { '#theme': 'image_style', '#style_name': 'despliegue_blog', '#uri': node.field_image.entity.uri.value, '#attributes': { class: 'img-responsive' }, } %} {{ imageblog }} </div> # Example 2. #Install the Twig Tweak Module https://www.drupal.org/project/twig_tweak #And this module Twig Field https://www.drupal.org/project/twig_field_value <img src="{{ node.field_image.entity.uri.value | image_style('despliegue_1366x768_px') }}" alt="{{ node.field_image.alt }}"/>