Compress images in the browser