Azure C # WebJob con ImageResizer no establece correctamente el tipo de contenido

Estoy trabajando en un Azure WebJob para cambiar el tamaño de las imágenes recién cargadas. El cambio de tamaño funciona, pero las imágenes recién creadas no tienen su tipo de contenido configurado correctamente en Blob Storage. En su lugar, se enumeran application / octet-stream. Aquí el código que maneja el cambio de tamaño:

public static void ResizeImagesTask(
    [BlobTrigger("input/{name}.{ext}")] Stream inputBlob,
    string name,
    string ext,
    IBinder binder)
{
    int[] sizes = { 800, 500, 250 };
    var inputBytes = inputBlob.CopyToBytes();
    foreach (var width in sizes)
    {
        var input = new MemoryStream(inputBytes);
        var output = binder.Bind<Stream>(new BlobAttribute($"output/{name}-w{width}.{ext}", FileAccess.Write));

        ResizeImage(input, output, width);
    }
}

private static void ResizeImage(Stream input, Stream output, int width)
{
    var instructions = new Instructions
    {
        Width = width,
        Mode = FitMode.Carve,
        Scale = ScaleMode.Both
    };
    ImageBuilder.Current.Build(new ImageJob(input, output, instructions));
}

Mi pregunta es dónde y cómo establecería el tipo de contenido. ¿Es algo que tengo que hacer manualmente o hay un error en la forma en que estoy usando la biblioteca que me impide asignar el mismo tipo de contenido que el original (el comportamiento que la biblioteca dice que debería exhibir)?

¡Gracias!

ACTUALIZACIÓN FINAL

Gracias a Thomas por su ayuda para llegar a la solución final, ¡aquí está!

public class Functions
{
    // output blolb sizes
    private static readonly int[] Sizes = { 800, 500, 250 };

    public static void ResizeImagesTask(
        [QueueTrigger("assetimage")] AssetImage asset,
        string container,
        string name,
        string ext,
        [Blob("{container}/{name}_master.{ext}", FileAccess.Read)] Stream blobStream,
        [Blob("{container}")] CloudBlobContainer cloudContainer)
    {

        // Get the mime type to set the content type
        var mimeType = MimeMapping.GetMimeMapping($"{name}_master.{ext}");

        foreach (var width in Sizes)
        {
            // Set the position of the input stream to the beginning.
            blobStream.Seek(0, SeekOrigin.Begin);

            // Get the output stream
            var outputStream = new MemoryStream();
            ResizeImage(blobStream, outputStream, width);

            // Get the blob reference
            var blob = cloudContainer.GetBlockBlobReference($"{name}_{width}.{ext}");

            // Set the position of the output stream to the beginning.
            outputStream.Seek(0, SeekOrigin.Begin);
            blob.UploadFromStream(outputStream);

            // Update the content type =>  don't know if required
            blob.Properties.ContentType = mimeType;
            blob.SetProperties();
        }
    }

    private static void ResizeImage(Stream input, Stream output, int width)
    {
        var instructions = new Instructions
        {
            Width = width,
            Mode = FitMode.Carve,
            Scale = ScaleMode.Both
        };
        var imageJob = new ImageJob(input, output, instructions);

        // Do not dispose the source object
        imageJob.DisposeSourceObject = false;
        imageJob.Build();
    }

    public static void PoisonErrorHandler([QueueTrigger("webjobs-blogtrigger-poison")] BlobTriggerPosionMessage message, TextWriter log)
    {
        log.Write("This blob couldn't be processed by the original function: " + message.BlobName);
    }
}

public class AssetImage
{
    public string Container { get; set; }

    public string Name { get; set; }

    public string Ext { get; set; }
}

public class BlobTriggerPosionMessage
{
    public string FunctionId { get; set; }
    public string BlobType { get; set; }
    public string ContainerName { get; set; }
    public string BlobName { get; set; }
    public string ETag { get; set; }
}

Respuestas a la pregunta(1)

Su respuesta a la pregunta