ensure img size is reduced in ratio.