---
title: "Discussion on \"Import image in React JS\" | Hashnode"
description: "Discussion on \"Import image in React JS\". Below are various ways of importing an image in React JS \n\nAdd image to your /src directory then import image and load like below\nimport star from './star.jpg';\n//In your const or function\n<img src={star} alt=\"Girl in a jacket\" width=\"50\" height=\"50\"..."
url: "https://hashnode.com/posts/import-image-in-react-js/61459095e1f56817e3605fce"
---

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

Discussion

# [Import image in React JS](https://blog.azcodez.com/import-image-in-react-js?utm_source=hashnode&utm_medium=feed)

Below are various ways of importing an image in React JS Add image to your /src directory then import image and load like below import star from './star.jpg'; //In your const or function <img src={star} alt="Girl in a jacket" width="50" height="50"...

Sep 18, 2021 · 1 min read · blog.azcodez.com  
Updated Aug 6, 2022  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)

## Written by

[Asrin Dayananda](https://hashnode.com/@azcodez)

@azcodez · United Kingdom

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

Cloud & Software Engineer 👨‍💻

Software engineer focusing on PHP, JavaScript, HTML, CSS, CI/CD, GitHub, AWS, Azure &amp; Magento Commerce. I enjoy code for good projects, tech, gym, nature, travel, fried chicken, and coffee. All my articles are educational only from my experience. Feel free to connect.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
