Add images to Azure blob storage in .NET Core

This article explains how to add images to Azure blob storage container using C# .NET Core. The Complete code can be downloaded from following GitHub repository

  • Nuget Url: packages /ailogica.Azure.Helpers/
  • Source Code: nulhaq /Azure-Helpers

Before starting please make sure you have already created azure storage account and already added a blob container.

Installation and configuration.

The first step is to install “ailogica.Azure.Helpers” NuGet package. This package contains a lot of helpers to work with Microsoft Azure. 

When you install “ailogica.Azure.Helpers” NuGet package there are other NuGet packages installed as part of the installation. One notable page is “WindowsAzure.Storage” NuGet package. This package is a Microsoft Azure storage SDK from Microsoft. This SKD helps us to perform different operations such as Create, Read, Update, Delete for Blobs, File storage and also helps us to manage queues.

ailogica azure helpers


You need to add Azure blob storage Connection string in App.Config or Web.Config and you need to pass this connection string to BlobHelpers while instantiating an object. 

var azureHelper = new BlobHelpers("YourBlobStorageConnectionString");

Upload Images to blob Storage

Following code 2 liner snippet will help you to add images in a blob container of your choice

var azureHelper = new BlobHelpers("YourBlobStorageConnectionString");
var uploadBlobs = azureHelper.UploadBlobs("ContainerName", "FileName", "FilePath");

Check if a specific Image is already in Azure Blob Container.

var azureHelper = new BlobHelpers("YourBlobStorageConnectionString");
bool isExist = azureHelper.BlobExist("ContainerName", "FileName", "FilePath");

Next articles of this series will explain

  • List Images from Azure Blob Storage Container.
  • Get Images from Azure Blob Storage Container.
  • Download images from Azure Blob Storage Container.

About the author

Naveed Ul-Haq

I am a UK-based Technical Architect, Founder & Technology Evangelist. I'm Optimizely MVP & Optimizely SME on Content Cloud and Commerce Cloud. I love working on .NET-based CMS, eCommerce solutions, .NET Core, DevOps, and Cloud computing. I'm also a Certified Optimizely Content Cloud Developer, Certified Optimizely Commerce Cloud developer, Optimizely B2B Commerce developer and Microsoft Certified Professional in Azure application development. I spend my free time with my family and reading books. You can contact me at

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *