add check for type image