'Need to read an image in node js

I need to read an image in node js. In python code

with open(path, 'rb') as f:
  contents = f.read()

This code gives me correct output. How can I implement the same read function in node js.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source