Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29580

ImageVariation has height and width set to NULL

    XMLWordPrintable

    Details

      Description

      Image Aliases has height and width not available (set to NULL).

      Steps to reproduce:
      1. Create template for ezimage_field:

      {% block ezimage_field %}
          {% spaceless %}
              {% if not ez_is_field_empty( content, field ) %}
                  {% set imageAlias = ez_image_alias( field, versionInfo, parameters.alias  ) %}
                  {{ dump(imageAlias.height) }} {{ dump(imageAlias.width) }}
              {% endif %}
          {% endspaceless %}
      {% endblock %}
      

      2. Define new image_variation:

      image_variations:
          small:
              reference: null
                  filters:
                      - { name: geometry/scaledownonly, params: [100, 160] }
      

      3. Create new Image content.
      4. Display Image using provided image variation and template:

      {{ ez_render_field(content, 'image', { parameters: { 'alias': 'small' }, template: 'ezimage.html.twig' }) }}
      

      Results:
      Image Alias will have it width and height set to NULL.

      Expected result:
      Actual width and height of an Image Alias.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mateusz.bieniek@ez.no Mateusz Bieniek
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: