Question Details

Imagemap - Image hosting

Dear all,

Can I have a further question regarding imagemap? I know teh restful API endpoint will be requried for imagemap, and the endpoint should be like this:

Do you have any ideas on how to host images and expose the images as rest API endpoint like above? any existing service/cloud can be used for quick start?

Any suggestions would be very helpful!


Profile picture


Profile picture
Posted: 1 years ago
Edited: 1 years ago

OK, seems nobody has solutions or experiences. Let me share my solution here in case that you guys has simialr requirement. I beleive you should have same requriement if you use Line massasge API.

1. Create Node.js project 2. Import express and start a simple server

app.listen(process.env.PORT || 8080, () => {
  console.log('@==LineImageAPI==@ server is running at ' + process.env.PORT || 5000);

3. Provide a rest api for fetching images from the server like bwlow:

app.get('/image/:category/:size', (req, res) => {
 const requestedCategory = req.params['category'];
 const requestedSize = req.params['size'];
 fs.createReadStream('public/images/' + requestedCategory + '/' + requestedSize + '.jpg').pipe(res);

4. Place your images into the root libelow structure:


5. Deploy your express to aws, google or other servers you have.

6. Access to, then you should get the image from browser or postman.

7. Copy the to your linebot source code for imagemap object - baseUrl. You do not need to specify the size here for rest api, as line will use the proper size of images for you automatically.

Finally, AWS S3 proxy might be a good idea but I did not get it done as of now. anybody else could share your experience if you made it succefully.



Are you sure? question.vm