Currently, I am developing an application that requires loading images from a web novel stored in Azure Storage Accounts as blobs. While I have enabled anonymous reads to show the image upon request successfully via a web browser or Postman, I am facing an issue where instead of accessing the actual image, I am getting text data.
I have attempted using axios to request the image as a blob, but it returns text data. I also tried utilizing an arraybuffer like this:
app.get('/', async (req, res) => {
const response = await axios.get(
"azure blob link",
{ responseType: 'arraybuffer' }
);
res.set('Content-Type', 'image/jpeg');
res.send(Buffer.from(response.data, 'binary'));
});
Nevertheless, sending multiple images using this method seems unfeasible. Do you think implementing a CDN is necessary since users will frequently access these images for reading?