added: error handling for type 'image'