---
title: "Discussion on \"How to download an image from URL in nodejs\" | Hashnode"
description: "Discussion on \"How to download an image from URL in nodejs\". In this article, we'll learn that how can we download images from a remote URL. After downloading the image, we will encode it in base64 format.\noriginal post\nconst { Buffer } = require(\"buffer\");\nconst axios = require(\"axios\");\nlet url = \"https://re..."
url: "https://hashnode.com/posts/how-to-download-an-image-from-url-in-nodejs/61b0e18e6a616156e95e1f37"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to download an image from URL in nodejs](https://dsabyte.com/how-to-download-an-image-from-url-in-nodejs?utm_source=hashnode&utm_medium=feed)

In this article, we'll learn that how can we download images from a remote URL. After downloading the image, we will encode it in base64 format. original post const { Buffer } = require("buffer"); const axios = require("axios"); let url = "https://re...

Dec 8, 2021 · 1 min read · dsabyte.com  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#axios](https://hashnode.com/tag/axios)

## Written by

[Rahul kumar](https://hashnode.com/@rahul965)

@rahul965 · India

  
[View profile](https://hashnode.com/@rahul965)

Developer

I am software engineer

## Responses 2

Markdown supported · ⌘↵ to post

[Said Mounaim](https://hashnode.com/@smounaim)

[Dec 9, 2021](https://hashnode.com/posts/how-to-download-an-image-from-url-in-nodejs/61b0e18e6a616156e95e1f37/comment/61b1cb7f1907c16be2edfe7d)

Greaat Joob, Thank youu

[Rahul kumar](https://hashnode.com/@rahul965)

[Dec 14, 2021](https://hashnode.com/posts/how-to-download-an-image-from-url-in-nodejs/61b0e18e6a616156e95e1f37/comment/61b1cb7f1907c16be2edfe7d#reply-61b884d6d2a5c9036e6f0bba)

Thank You :)

[DAVID ZIRIMA](https://hashnode.com/@BlackMhofu)

[Dec 8, 2021](https://hashnode.com/posts/how-to-download-an-image-from-url-in-nodejs/61b0e18e6a616156e95e1f37/comment/61b0e1d0ccd13f578941e9b5)

Thanks

[Rahul kumar](https://hashnode.com/@rahul965)

[Dec 14, 2021](https://hashnode.com/posts/how-to-download-an-image-from-url-in-nodejs/61b0e18e6a616156e95e1f37/comment/61b0e1d0ccd13f578941e9b5#reply-61b884df0059f90a57a58604)

Thank You :)
