-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Won't Fix
-
Affects Version/s: 5.4.12
-
Fix Version/s: Customer request
-
Component/s: Content (images, XML, PDF, RSS, etc.)
-
Labels:None
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.