fixed image optimization issues