Image Picker + GIF + File Transfer

I’m trying to implement upload where object can be an animated GIF. I’m using cordova-plugin-image-picker and cordova-plugin-file-transfer. I can see the uploaded GIF but its not animated anymore and its still in gif format. There are no errors and I can’t find anything on the web with the same issue. Can anyone point me to the right direction on solving this?

Maybe it is a thing of your backend. There is maybe a file-converter or a file transformation which strips the animation during generation of e.g. different image sizes and so on.

Hi thanks for the response,

I was able to upload the animated GIF by hardcoding the path of the file. Now I need to know how to get the absolute path. Seems to me that image picker creates a temp copy of the file somewhere, which results on GIF not being animated anymore.

Finally a colleague of mine saw what I was doing wrong, for anyone encountering the same issue, you can use cordova camera plugin instead of image picker and on selecting GIF from gallery set the quality to 100 and mediaType to ALLMEDIA.

So much wasted time :sob:

2 Likes

but you finally got it working! Nice and it will help others. So keep you head up high… better fighting than giving up :slight_smile:

1 Like

Please provide me the solution since i am also struggling with this issue.
I am using $cordovaImagePicker and my gif animation is gone after uploading to server

I’m having the same issue using ImagePicker, cordova-plugin-camera works but I need multiple selection functionality. Any other solution?

1 Like