Add image type checking
Update example and tests