add resize image before sending