resolve images ratio problem