Skip to content
Sign upLog in
← Back to Community

How to upload images in html

Profile icon
afm555

How do you put in images from your files into a website? (Btw i'm on chrome)

Answered by QuantumCodes [earned 5 cycles]
View Answer
Voters
Profile icon
BlazingStar1
Profile icon
afm555
Comments
hotnewtop
Profile icon
QuantumCodes

<img src = "put link here"> btw, somehow when i tried putting <img src="img.png"> and img.png was in replit, it didnt work. So, instead if you can, host your image online...

Profile icon
afm555

@QuantumCodes
thank you so much, I didn't know you had to upload the image into replit.

Profile icon
QuantumCodes

@afm555
actually.... how did u do it? XP i tried but i failed... so i used a http link... Fact: i actually use scratch : Ankit_Anmol but... i am banned

Profile icon
afm555

@QuantumCodes
you have to upload the image in to replit, there's a button that says upload file

Profile icon
QuantumCodes

@afm555
i know how to upload... idk how to img src thing.. it just doesnt work for me. You saves where? In the same folder as the html file?

Profile icon
afm555
Profile icon
QuantumCodes
Profile icon
JoyZhang4

how do you put an image on asus

Profile icon
codingjlu

Well, if you want to permanently upload it, you need a backend like Python, PHP, Node.js, Java, or Go.

Profile icon
Coder100
Profile icon
ch1ck3n

<input type="file">

Profile icon
afm555

@ch1ck3n
what do i put in the src?

Profile icon
ch1ck3n

@afm555
nothing

Profile icon
afm555

@ch1ck3n
then how would it know what image to put?

Profile icon
ch1ck3n

@afm555
wdym

Profile icon
afm555

@ch1ck3n
the src is what the image is, what do I put there?

Profile icon
ch1ck3n

@afm555
ohh

you can't directly pull files from a user's computer

they have to upload it

Profile icon
afm555
Profile icon
afm555

@ch1ck3n
then how do you upload it?

Profile icon
ch1ck3n

@afm555
<input type="file">

Profile icon
afm555

@ch1ck3n
tell me what I did wrong, but i put in,

Profile icon
ch1ck3n

@afm555
<input type="file"> AND NOTHING ELSE

YOU CANT SPECIFY WHICH FILE

Profile icon
ch1ck3n
Profile icon
afm555

@ch1ck3n
oh, your talking about the wrong thing. I mean how do I input a an image from MY computer?

Profile icon
ch1ck3n

@afm555
<img src="Logo1.png">

Profile icon
afm555

@ch1ck3n
not working for me

Profile icon
ch1ck3n

@afm555
send me your repl

Profile icon
afm555

@ch1ck3n
https://northerntechgamesandsoftware.afm555.repl.co/ I'm trying to put a second image after the first one.

Profile icon
ch1ck3n

@afm555

image

works for me

Profile icon
afm555

@ch1ck3n
what works for you?