I'm trying to calculate some image sizes for Imager.
This works:
{% set imageSizes = [{ height: imageHeight * 4}, { height: imageHeight * 3}, { height: imageHeight * 2}, { height: imageHeight}] %}
But how do i get halfs?
imageHeight * 2.5, imageHeight * 0.5 or imageHeight / 2 does not work.
Edit:
It was my own fault.
I checked the array and only saw width's. I set the images sizes in the CP and to:
{% if imageHeight is not empty %}
{% set imageSizes = [{ height: imageHeight * 4}... %}
{% else %}
{% set imageSizes = [{ width: imageWidth * 4}... %}
{% endif %}
I only wrote the half calculation in "if imageHeight" for testing. But the entry i use for testing has only width's...