public static void Main()
Console.WriteLine("Hello World");
var x = ImageHelpers.GetProductImage("test", 2661, "ThisPhoto", "");
public static class ImageHelpers
private static string _baseURL;
public static string BaseURL {
return _baseURL ?? "https://repziocdn.global.ssl.fastly.net/productimages";
public static string GetProductImage(int manufacturerId, string photoName, string parameters)
photoName = string.IsNullOrEmpty(photoName) ? "blank" : photoName.ToLower();
if (string.IsNullOrEmpty(parameters))
var imageURL = photoName.StartsWith("http") ? string.Format("{0}?{1}&tstamp={2}", photoName, parameters, DateTime.Now.Ticks) : string.Format("{0}/{1}/{2}_lg.jpg?{3}", BaseURL, manufacturerId, photoName, parameters);
public static string GetProductImage(string baseUrl, int manufacturerId, string photoName, string parameters)
photoName = string.IsNullOrEmpty(photoName) ? "blank" : photoName.ToLower();
if (string.IsNullOrEmpty(parameters))
var imageURL = photoName.StartsWith("http") ? string.Format("{0}?{1}&tstamp={2}--------{3}", photoName, parameters, DateTime.Now.Ticks, baseUrl) : string.Format("{0}/{1}/{2}_lg.jpg?{3}--------{4}", BaseURL, manufacturerId, photoName, parameters, baseUrl);