const fs = require('fs').promises; const contents = await fs.readFile('/path/to/file.jpg', {encoding: 'base64'});