client side image resizing iOS fix