Skip to content

Issues with GIFs #37

@tortilaman

Description

@tortilaman

I've run into a very odd issue with gifs. It revolves around JIMP, but I haven't seen it mentioned there, so I'm not 100% sure yet whether the issue is with JIMP, or with this particular implementation of it.

When trying to upload a gif with apostrophe-images, it gives the generic image error in the browser, and on the server, it gives the following error output:

Unsupported MIME type: image/gif
Unsupported MIME type: image/gif
Unsupported MIME type: image/gif
Unsupported MIME type: image/gif
Unsupported MIME type: image/gif
Unsupported MIME type: image/gif
TypeError: Cannot read property 'bitmap' of undefined
    at Jimp.<anonymous> (/Users/nick/Development/annual-report/cms/node_modules/apostrophe/node_modules/uploadfs/lib/image/jimp.js:46:34)
    at Jimp.throwError (/Users/nick/Development/annual-report/cms/node_modules/jimp/index.js:85:44)
    at ReadFileContext.callback (/Users/nick/Development/annual-report/cms/node_modules/jimp/index.js:201:44)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:366:13)

Jimp knows what the MIME type is in previous functions, and has a conditional to handle image/gif specifically, yet when it gets here, the image variable is undefined. Let me know if there's more information I can provide, I'm not the best at debugging, haha.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions