Shell script to cleanup and optimize images.