Size images optimally on mobile devices