how to convert image buffer to base64 in image input and send nodejs code example
Example 1: nodejs read image as base64
const fs = require('fs');
const contents = fs.readFileSync('/path/to/file.jpg', {encoding: 'base64'});
Example 2: nodejs read image as base64
const fs = require('fs').promises;
const contents = await fs.readFile('/path/to/file.jpg', {encoding: 'base64'});