I would just check if the first five chars are `data:`