Added code to reduce image size