Added compress image support