public class Base64UrlImageBuilder
{
    public required string ContentType { set; get; }

    public string Url
    {
        set
        {
            var httpClient = new HttpClient();
            var response = (httpClient.GetAsync(new Uri($"{value}"))).Result;
            var bytes = (response.Content.ReadAsByteArrayAsync()).Result;
            FileContents = Convert.ToBase64String(bytes);
        }
    }

    private required string FileContents { get; set; }

    public override string ToString()
    {
        //return $"data:{ContentType};base64,{FileContents}";
        return $"{FileContents}";
    }
}