How to compress a JPEG image

I once tried uploading a blog image. It failed.