imagefilecordovaphonegap-pluginsfile-location

how to get image Details form mobile folder location


We have image path like

cdvfile://localhost/persistent/DCIM/Camera/1395167011485.jpg.

OR

file://localhost/persistent/DCIM/Camera/1395167011485.jpg.

We need get image details using this path.Image details like Image Name,height, width.We are developing Cordova mobile apps.Please guide to us .Which plugin we need use for Details.


Solution

  • You don't need a specific plugin, though you could use file transfer to help with it. Something like the following will work fine:

    var image = document.createElement('img');
    image.src = "img/My_Image.png";
    console.log(image.height);
    console.log(image.width);