Reduce image size before sending it