I'm writing a custom TBB in C# specifically for an email page used in our Outbound Emails.
I've come across difficulties with Gmail in rendering my images so I wrote a small console app to test an idea of embedding the image straight into the markup in order to avoid Google's proxy server and image caching.
The premise of the TBB is to effectively retrieve the path of the published image along with the correct domain. Download the image (small social media icons) and convert the data into Base64 encoding. Additional processing and this is now ready to be embedded to the markup.
The problem is that when retrieving the path of an icon instead of getting:
I would get:
Accessing the second link is throwing 401 (Unauthorized) and I don't want to add authentication information as this will be the likely case with every environment.
Is there a way to retrieve the published path of these icon so that I may retrieve the image?
Any help would be appreciated.