user1012500
user1012500

Reputation: 1657

ImageResizer with Azure Blob storage Azurewebsites

I'm looking to resize an image that is uploaded to my site, I'm using Azure Blob storage to store the physical files and I'm serving the files either via a public container or a private container (depending on the image).

I found the following tutorial the describes ImageResizer (http://benfoster.io/blog/high-performance-image-processing-with-image-resizer-and-azure). However, it is requesting for the container to be public. In my scenario I have multiple containers (public and private - blob). I place sensitive images in the private container, and I have my own api to download from the container if the user has access to view the image.

In this scenario can I use ImageResizer ?

Is it possible pre-save the images in various sizes as opposed to doing this in real time ?

Thanks

Upvotes: 1

Views: 1942

Answers (2)

Fishcake
Fishcake

Reputation: 10774

Is it possible pre-save the images in various sizes as opposed to doing this in real time ?

Yes. It is possible, we are currently doing just that using Event Grid subscriptions

Based on the examples in this article we have an Azure function that is triggered by a BLOB being written that generates 3 different sizes of image.

I personally found that ImageResizer used with Azure Storage simply wasn't fast enough and whilst performance may improve with caching/CDN we needed the first request to be fast so generating the smaller images at the time of writing them worked much better for us.

Upvotes: 1

Lilith River
Lilith River

Reputation: 16468

ImageResizer's Azure blob storage provider works with both public and private containers.

https://imageresizing.net/docs/v4/plugins/azurereader2

Upvotes: 1

Related Questions