script to compress images