Added image valid method