templates/Includes/editableImageHelper.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     {{ pimcore_image(name, {
  3.         thumbnail: thumbnail,
  4.         class: class|default(''),
  5.         lowQualityPlaceholder: lowQualityPlaceholder|default(false),
  6.     })|raw }}
  7. {% elseif not pimcore_image(name).empty %}
  8.     {% set description = getImageDescription(pimcore_image(name).image, true) %}
  9.     {% if not title|default(null) %}
  10.         {% set title = description %}
  11.     {% endif %}
  12.     {% if not alt|default(null) %}
  13.         {% set alt = description %}
  14.     {% endif %}
  15.     {% do elements_opengraph().addImage(pimcore_image(name).thumbnail(thumbnail).path) %}
  16.     {% if printTwiceLowQAndNoLowQPlaceholder|default(false) %}
  17.         {% if not editmode %}
  18.             {{ pimcore_image(name).thumbnail(thumbnail).html({
  19.                 lowQualityPlaceholder: true,
  20.                 imgAttributes: {
  21.                     class: class|default(''),
  22.                     title: title,
  23.                     alt: alt,
  24.                     loading: 'eager'
  25.                 },
  26.             })|raw }}
  27.         {% endif %}
  28.         {{ pimcore_image(name).thumbnail(thumbnail).html({
  29.             imgAttributes: {
  30.                 class: class|default(''),
  31.                 title: title,
  32.                 alt: alt,
  33.                 loading: 'eager'
  34.             },
  35.             pictureAttributes: {
  36.                 fetchpriority: 'high',
  37.             },
  38.         })|raw }}
  39.     {% else %}
  40.         {{ pimcore_image(name).thumbnail(thumbnail).html({
  41.             lowQualityPlaceholder: lowQualityPlaceholder|default(false),
  42.             imgAttributes: {
  43.                 class: class|default(''),
  44.                 title: title,
  45.                 alt: alt
  46.             }
  47.         })|raw }}
  48.     {% endif %}
  49. {% endif %}