adjust image size and redefine empty