+ 1

I coundn't attach the images in HTML😐

I have a image named 4.jpg Code to attach that image??

16th Mar 2021, 11:22 AM
Rajesh✊✌️
Rajesh✊✌️ - avatar
3 Respostas
+ 1
You should save the image and your html file, in the same folder. Example: Create a folder called image uploading, and save the 4.jpg in it. Then write your html codes, and save it in that folder. So ut will be uploaded to your webpage. But Hey!!! A better solution; why don't you use base64? Base64 has 64 characters: 0-9, a-z, A-Z, - and _ You can upload your 4.jpg photo into google drive, hover on the three vertical dots, tap share, tap on who has access, and tap change, and restricted; then Anyone with the link. Then copy the link adress, and paste it in your src attribute. You should take out the id, and make a bit change on it. Example: https://drive.google.com/file/d/4fHsUe374bsJGsJdgd48GSjDjdFSPr/view?usp=drivesdk Our id here is: 4fHsUe374bsJGsJdgd48GSjDjdFSPr Remove the /view?usp=drivesdk: https://drive.google.com/file/d/4fHsUe374bsJGsJdgd48GSjDjdFSPr Then replace file/d/ with uc?id= Finally it should look like this: https://drive.google.com/uc?id=4fHsUe374bsJGsJdgd48GSjDjdFSPr
18th Mar 2021, 1:21 PM
🇮🇱 Radin Masiha 🇮🇱
🇮🇱 Radin Masiha 🇮🇱 - avatar
0
Hi! where is your picture located and where are you trying to insert it?
16th Mar 2021, 2:16 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
- 2
Do you want to display the image in the web page? If so, then use this into the body of the html: <img href="4.jpg"> The has to be in the same folder as the html file. Or you have to specify the image path into href attribute.
16th Mar 2021, 11:40 AM
Abir Hasan
Abir Hasan - avatar