compress image to avoid the size over 32kb limitation by wechat