diff --git a/src/bundle/Resources/views/themes/admin/ui/field_type/preview/content_fields.html.twig b/src/bundle/Resources/views/themes/admin/ui/field_type/preview/content_fields.html.twig index 350cf3ebbe..ae6ee466c8 100644 --- a/src/bundle/Resources/views/themes/admin/ui/field_type/preview/content_fields.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/field_type/preview/content_fields.html.twig @@ -433,10 +433,12 @@ {{ 'ezimage.master_dimensions'|trans|desc('Master dimensions') }}: {{ 'ezimage.width_and_height'|trans({'%width%': field.value.width, '%height%': field.value.height})|desc('Width: %width%px height: %height%px') }} - - {{ 'ezimage.ratio'|trans|desc('Ratio') }}: - {{ (field.value.width/field.value.height)|round(2) }} - + {% if field.value.height != '0' %} + + {{ 'ezimage.ratio'|trans|desc('Ratio') }}: + {{ (field.value.width/field.value.height)|round(2) }} + + {% endif %}