Azure Trigger on Blob storage, extract EXIF (lat/long/direction…) data from image (Blob)

Solution for Azure Trigger on Blob storage, extract EXIF (lat/long/direction…) data from image (Blob)
is Given Below:

I am trying to retrieve lat/long/rotation attributes from jpegs uploaded to Azure but can’t get it.

current function on trigger:

module.exports = async function (context, myBlob) {
    context.log( myBlob);

the Trigger is on upload and I can get URI for the file uploaded

finally found a solution

  1. you have to install “exif-parser” using npm
  2. to access PowerShell or CMD using (Kudu)
  3. go to “Advanced Tools”

enter image description here

  1. Afterwards, launch the PowerShell debug console and navigate to the wwwroot folder of your app

enter image description here

  1. then install your module “npm install exif-parser”
  2. if any error show for”package.json” ignore it
  3. go to you trigger or function app and test the module 🙂
const exifParser = require('exif-parser');
module.exports = async function (context, myBlob) {
    var parser = require('exif-parser').create(myBlob);
    var result = parser.parse();

If you are reading the JPEGs with a reader, then there should be various EXIF format attributes that just need to be exposed.

If you are downloading the JPEG as binary, then I think you’ll need to save the file and then read it back to get that EXIF info.

Try with using Exif.js JavaScript library

A JavaScript library for reading EXIF meta data from image files.

You can use it on images in the browser, either from an image or a file input element. Both EXIF and IPTC metadata are retrieved. This package can also be used in AMD or CommonJS environments.

For more reference follow this github code