keep image size in check