Если вы знаете URL-адрес изображения этих значков, вы можете попробовать использовать Node Image Downloader . Учитывая URL, он может загрузить изображение по указанному вами пути.
npm install --save image-downloader
Использование с обещанием:
const download = require('image-downloader')
// Download to a directory and save with the original filename
const options = {
url: 'http://someurl.com/image.jpg',
dest: '/path/to/dest' // Save to /path/to/dest/image.jpg
}
download.image(options)
.then(({ filename, image }) => {
console.log('File saved to', filename)
})
.catch((err) => {
console.error(err)
})
// Download to a directory and save with an another filename
options = {
url: 'http://someurl.com/image2.jpg',
dest: '/path/to/dest/photo.jpg' // Save to /path/to/dest/photo.jpg
}
download.image(options)
.then(({ filename, image }) => {
console.log('File saved to', filename)
})
.catch((err) => {
console.error(err)
})