image optimization during compilation added