2

This is my project: https://stackblitz.com/edit/react-cu1smg?file=src/images/react_logo_icon.pngfile=src%2Fimages%2Freact_logo_icon.png

I'm currently learning React JS and I need help on uploading an image file to this editor. I want it uploaded in the "react_logo_icon.png" file in the "images" file. I looked everywhere for an image upload option/button, but I couldn't find it.

I searched the exact same functionality in a similar editor called codesandbox, and it was there, but I couldn't find it on stackblitz(current editor i'm working on)

So if you could please help me, that would be great! Thank you

Suhas
  • 113
  • 1
  • 3
  • 9
  • https://stackoverflow.com/questions/39458511/how-to-use-es6-import-for-images maybe this will help – omercotkd Mar 23 '22 at 16:21
  • Sorry, I don't want to import the image, i just want it in that react_logo_icon file. Do you know how to upload an image to the stackblitz editor? – Suhas Mar 23 '22 at 16:23
  • you want to change the image file `react_logo_icon.png` to have a different image? – omercotkd Mar 23 '22 at 16:24
  • No, currently react_logo_icon doesn't have an image. It's just an empty file. I want to upload an image to the editor and put that image in that file(react_logo_icon.png) – Suhas Mar 23 '22 at 16:26
  • just upload an image and change the name of it to `react_logo_icon.png` – omercotkd Mar 23 '22 at 16:30
  • that's the problem. I don't know how to upload an image in stackblitz. I just created an empty file and named it `react_logo_icon.png` – Suhas Mar 23 '22 at 16:32
  • it wasn't clear at all from your question... please rewrite it and change the title... it doesn't have anything to do with react, it's a question about a code editor. – omercotkd Mar 23 '22 at 16:34
  • I changed the title, but I think the description is pretty clear. `I'm currently learning React JS and I need help on uploading an image file to this editor. I want it uploaded in the "react_logo_icon.png" file in the "images" file.` – Suhas Mar 23 '22 at 16:36
  • When I try to upload it says that I need a pro account... so I guess unless you have a pro account you cant upload images – omercotkd Mar 23 '22 at 16:40
  • Can you please show me a screenshot of which button or where you clicked to upload? – Suhas Mar 23 '22 at 16:42
  • I dragged an image from my desktop to the editor... – omercotkd Mar 23 '22 at 16:44
  • Yeah, i tried that, but it had no effect in the editor. – Suhas Mar 23 '22 at 16:46

3 Answers3

0

you can create an assets folder. then upload photos to the assets folder. you can then reference the images in your project.

Note upload photos is a premium feature.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 29 '23 at 20:15
0

You can attempt to upload an image file to the StackBlitz editor by dragging and dropping. However, without a paid membership, you will get this error message:

StackBlitz image upload error message.

If you're project is on GitHub, you can clone your repository (images included) into a StackBlitz project by prepending your project's GitHub URL with the StackBlitz domain:

stackblitz.com/github/<username>/<repo-name>

Hope this helps.

damonholden
  • 1,062
  • 4
  • 17
  • 3
    Actually that might have changed. Just dropped an image successfully without a paid membership ! – nimser Jul 16 '23 at 21:37
-1

[enter image description here][1]

Giahaa [1]: https://i.stack.imgur.com/r3Pnf.jpg

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 24 '23 at 07:48
  • What's not clear? I guess, for a bot it's not, but for humans it is: by providing a link to imgur image, this person states that you don't actually need to pay to Stackblitz to use images - you can use any free image hosting service. – shal Jul 21 '23 at 10:30