image optimize and script update