some validations and image resizing