I am trying to figure out how to convert an image to base64 on the ESP32 Cam board so I could then send it to AWS s3 bucket. Could someone please give me some insight?

camera pins used

  • 1
    What have you already tried? Also some information about what camera you are using and how it's attached to the ESP32 would probably be useful. – hardillb Aug 11 '19 at 10:21
  • 1
    I have tried using SPIFFS to upload an image to a webpage. Beyond that I have done a lot of research that tells me it may not even be possible. I added an image of how the camera is connected. – David Graff Aug 12 '19 at 11:39
  • What does the GPIO pinout have to do with "how to convert an image to base64 on the ESP32 Cam board"? Don't you have the image as a file or data structure? – Mawg says reinstate Monica Aug 14 '19 at 6:49
  • The image is a jpg on the sd card – David Graff Aug 16 '19 at 21:37

The first problem we have here is: ESP32 may not have enough RAM to do it.

There are a few examples on the web on how to save data collected from the ESP32-CAM to a microSD card. If you are familiar with that, you can now take a look on the base64.h library for the ESP32 arduino enviroment. If not, there is a very comprehensive tutorial by Rui Santos on YouTube, which you can find on this link.

Base64.h is a library for ESP32 (core) that implements the base64 conversions as simple as decode and encode. You can take a look on the source on github.

I never used the ESP32-CAM, but the result you want to achieve seems very simple to me. Have a look on those links and give it a try.

| improve this answer | |
  • I talked with Rui on his forum. He said something about using encode function. But I cant find the comment. TBH it is a bit over my head how to implement that github library – David Graff Aug 16 '19 at 21:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.