Ask coding questions

← Back to all posts
how to add image in html
AryanTaha (157)

in html

timmy_i_chen (1180)

<img src="link-to-image" />

but replace link-to-image with a url to the image :)

Wilke000 (636)

you are right @timmy_i_chen, thank you

EmmaCosta (4)

I try to put it but it doesn't work.

Whacko (324)

@EmmaCosta @hashtag123 @phayke @MoziBeast123 Did you add the https:// in front of the image url? Because if you want an image from, you need the https:// because if not the repl thinks you are trying to get a file in the repl, and as we know it doesn't exist, so it won't work. It should be:

<img src="">

How to get the URL of an image you like:

  1. Go to the website with the image you like, and right-click it.
I'm using an image from wikipedia.
  1. Press "copy-image-adress" and you're done! Then press control+v to paste the url.

In a comment? My way is to screen snip, save it as a folder and post it. If you're talking about your profile picture then you do the same thing except after you save, you click on edit profile then click on your icon and choose it.

Mrunank (65)

<img src="https://image.url" /> Just replace https://image.url with the provided iage url.

tussiez (1668)


Use the <img> element.

<img src="image.png">


Easy! Try this way:

<img src="your file name">

so in your file name just put in your URL, or your file name, that you uploaded. So you can just copy image address of a image. like this:

And paste that URL in the your file name. it will work. Or you can upload it from your files. Either way would work
That should work

JacksonStich (3)

how do I change the size of it?

NinjaCoderz (22)

@JacksonStich you writes this
<img src = "your file name" width = "write down the width you want">

seweed3 (6)

You basically just make a new repl, then take a picture or save the file of the image you want, and then press the add file button. This way, you can then do <img src=“..”>

KAQ357 (1)

You can do <img src=" ID to the picture "</img>
If you 2 finger click (not double-click) a picture, a rectangle will pop up, click "Copy Image Address" and command-v (replace with ID to the picture)


<img src="" alt "image" width="250" height="250">