+ 2

I struggle to have an image appear in my code sourcing it from my device it fails to appear when I run my code.

<img src="/Internal-storage/OG.jpg height="60">

2nd Aug 2020, 8:23 AM
Lucky Tlhogi
Lucky Tlhogi - avatar
15 Answers
2nd Aug 2020, 8:46 AM
Simba
Simba - avatar
+ 6
Yogeshwaran I think it's relative to device. Thank you. Now i understood fully about file protocol.
2nd Aug 2020, 9:03 AM
TOLUENE
TOLUENE - avatar
+ 5
Yogeshwaran Bro i used photo from my device in sololearn. Using file:///storage/emulated/0/image path.
2nd Aug 2020, 8:36 AM
TOLUENE
TOLUENE - avatar
+ 5
Yogeshwaran https://code.sololearn.com/WUVfh62bOd6Z/?ref=app it's relative to your device. this photo may not in your phone or this location isn't in your phone. so you may not see this. if you want to show picture,audio,video from your device. first copy the location then paste it with file:// . default file manager may not give you correct location. download another file manager and from it copy your file location.
2nd Aug 2020, 8:49 AM
TOLUENE
TOLUENE - avatar
+ 5
Yogeshwaran Can you see my image?? I was not sure it will be visible to others else me.
2nd Aug 2020, 8:58 AM
TOLUENE
TOLUENE - avatar
+ 5
Md Sayed Al Sahab you're right bro😊👍
2nd Aug 2020, 9:04 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 4
Md Sayed Al Sahab can you show me that code?
2nd Aug 2020, 8:38 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 4
Md Sayed Al Sahab you are right bro it works very well. I guess it will be also updated😂
2nd Aug 2020, 8:56 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 4
Md Sayed Al Sahab your certificate didn't load well. I see only the borders of that image. But when I try my phone images on your code.It works very well Anyway thank you for clearing my misunderstanding about IMG SRC.
2nd Aug 2020, 9:01 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 2
Md Sayed Al Sahab thank you it worked.
2nd Aug 2020, 9:01 AM
Lucky Tlhogi
Lucky Tlhogi - avatar
+ 1
Use Dropbox as cloud storage. Refere this code:- https://code.sololearn.com/WbzA5GDLT767/?ref=app
2nd Aug 2020, 8:25 AM
shubham kumar
shubham kumar - avatar
+ 1
Create account in Dropbox and upload photo in it and then create link and copy the link and paste in src attribute of img tag.
2nd Aug 2020, 8:26 AM
shubham kumar
shubham kumar - avatar
+ 1
Or try another link source of image directly from Google.
2nd Aug 2020, 8:28 AM
shubham kumar
shubham kumar - avatar
0
use actual location of file
3rd Aug 2020, 1:22 PM
JOHN WEST
JOHN WEST - avatar
0
You shold have to remove your fotst front slant / from src path...and define height by px or some else
4th Aug 2020, 3:50 AM
Chauhan Israil Aminbhai