Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

656
Views
How can I post base64 image data to a Discord webhook (without using discord.js)?

I've seen other question/answers on how to achieve this, but I do not want to use Discord.js (can't in my circumstance). I have a webhook URL and base 64 image data, but cannot find helpful documentation or otherwise documented question/answers that tells me how to properly post that image information to the webhook.

Based on the documentation (link), it seems as if I should be able to use the embed or file properties of the payload, but all examples use a direct link to the image rather than the data.

So I'm looking for the shape of the payload and what exactly form the image data should be in to be able to post via a Discord webhook.

Here's my payload from what I could gather from the docs (but this isn't correct): enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think it's should look like this, refer to the doc https://discord.com/developers/docs/reference#editing-message-attachments-example-request-bodies-multipartformdata

And it will take a lot of decode/encode work to make it right without sdk by the way.

--boundary
Content-Disposition: form-data; name="payload_json"
Content-Type: application/json

{
  "content": "Hello, World!",
  "embeds": [{
    "title": "Hello, Embed!",
    "description": "This is an embedded message.",
    "thumbnail": {
      "url": "attachment://myfilename.png"
    },
    "image": {
      "url": "attachment://mygif.gif"
    }
  }],
  "message_reference": {
    "message_id": "233648473390448641"
  },
  "attachments": [{
      "id": 0,
      "description": "Image of a cute little cat",
      "filename": "file.png"
  }, {
      "id": 1,
      "description": "Rickroll gif",
      "filename": "mygif.gif"
  }]
}
--boundary
Content-Disposition: form-data; name="files[0]"; filename="file.png"
Content-Type: image/png

[image bytes]
--boundary
Content-Disposition: form-data; name="files[1]"; filename="mygif.gif"
Content-Type: image/gif

[image bytes]
--boundary--
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!