If you just wanted to remove the
www. from the string, then why not simply remove it from the initial string?
Stings expose a function where you can replace a string to some other format. Try this,
string url = "www.example.com/images_folder/image_name.png";
string urlWithoutWww = url.Replace("www.", "");
Now you can use the second variable that won't have the initial
www. in it to show the image from your own website.
Learn more on
String.Replace[
^].