I have a large amount of files stored in a public Azure blob container, all of which are referenced directly via the HTML in my ASP.NET MVC web application. As an example a path to one of the images in blob storage looks like so:
//<my-storage-account-name>.blob.core.windows.net/public/logo.png
I want to avoid displaying my storage account name in my HTML source code so rather than:
<img src="//<my-storage-account-name>.blob.core.windows.net/public/logo.png"/>
I'd prefer to use this:
<img src="/images/logo.png"/>
I want to avoid setting up an MVC route and using the blob API to load the file into the response stream so thought a web.config solution might be the simplest solution, i.e.
<rule name="Image Redirect" stopProcessing="true">
<match url="^images/(.*)$" ignoreCase="false" />
<action type="Redirect" url="//<my-storage-account-name>.blob.core.windows.net/public/{R:1}" redirectType="Permanent" />
</rule>
QUESTION: Is this the most efficient method given that any page could be loading 30+ images at a time? Or should I just use the public blob URL despite my concerns for performance gains?