Compress image before sending