Resize image only if height is greater than value

Hi

I am using the resize image module, with the option : “maximum height = 1350 px”.
However in the case of a 1080 x 540 image, it still resizes it to 2700 x 1350.

I want to resize only if the height is greater than 1350. How to do this please ?

Thanks