LPS-31861 Wrong condition when checking for small images