npm i ansi-img
// other option
yarn add ansi-img
import { imgFileToAnsi, imgBufferToAnsi } from 'ansi-img';
imgFileToAnsi('./image.jpg').then(console.log); //Log an image file in terminal
imgBufferToAnsi(buffer).then(console.log); //Log an image from buffer to terminal