Unable to upload image through programmatic upload API

dongqtm Member Posts: 4


I have been able to upload images through programmatic upload API before. However, there is one image that keep giving me "Invalid image file". The file is a GIF file so it should be a valid image file. I am able to upload this in other services, but doesn't work through cloudinary upload API for some reason. I also set the proper resource type as "resource_type : image"

I attached the file in this question.

It can also be accessed here

The code that I use for the upload is (in javascript)

    return new Promise((resolve: any, reject: any) => {
      cloudinary.uploader.upload(fileName, { resource_type: "image"}).then(async (result) => {
        if (result.secure_url) {
      }).catch((error) => {

Any help would be very appreciated. Thank you so much!


  • tia
    tia Member, Cloudinary Staff Posts: 24

    Hi there,

    Thanks so much for reaching out.

    Unfortunately, I'm not seeing the file. Could you try sending that along one more time? Can you also share your cloud name with me, so that I can look into our logs to help debug the issue? Are you using our SDK? And finally - are you getting any console errors? If so, can you please share them?

    I look forward to your reply.

    Kind Regards,


  • dongqtm
    dongqtm Member Posts: 4


    Please see the link below for the file


    The console error I am getting is `Invalid image file`

    Thank you so much!