Search code examples
imgur

How to upload an mp4 (or other video) to Imgur using the API?


I am using the Imgur API to upload images to albums, as part of a Reddit bot. However, when I try to upload MP4 files I get an error: "File type invalid (1)". Uploading the exact same MP4 file using the website works just fine.

I am using this endpoint to upload the file: POST https://api.imgur.com/3/image

https://apidocs.imgur.com/#c85c9dfc-7487-4de2-9ecd-66f727cf3139


Solution

  • From the imgur Help site, located here and last updated 2 months ago:

    https://help.imgur.com/hc/en-us/articles/115000083326-What-files-can-I-upload-What-is-the-size-limit-

    File Types

    If you need help learning how to upload on Imgur, check out this help article. You can upload any of the following files: JPEG, PNG, GIF, APNG, TIFF, MOV (desktop website only), MP4 (desktop website only)

    Imgur doesn't currently support uploads in the following formats: WEBM GIFV

    Explicitly, MP4s are only currently supported as uploaded manually via the website directly.

    Unfortunately, that means imgur does not support MP4 types through any method other than the Desktop site at this current time.