Discussion Forums  >  Images, Documents, File Locations

Replies: 9    Views: 96

xtremeesolutions
Code is Art
Profile
Posts: 106
Reg: Nov 19, 2011
FootHill Ranch,...
6,610
06/18/13 08:45 PM (11 years ago)

Image Path to add it in Custom Html

Hi all, How to give path of image to add it in Custom Html. I tried following code <img src="image.png"/> And this image is in Bt_Images folder . But no image displayed.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/18/13 11:35 PM (11 years ago)
Keep in mind that with respect to 'iOS', things need to be 'added' to the project, and for convenience, we keep them in the 'BT_images' directory. However, HTML has no clue what iOS is doing. All it knows is that (from your code above) the image should be in the 'same' directory as the html page. If you move your image into your BT_docs folder, or whichever folder the HTML page is located, then it will work. You can also try (and I haven't tested it, so yes, it's a 'try') <img src="../BT_images/image.png"> and see if that will work. Cheers! -- Smug
 
xtremeesolutions
Code is Art
Profile
Posts: 106
Reg: Nov 19, 2011
FootHill Ranch,...
6,610
like
06/19/13 09:46 PM (11 years ago)
@Smug, I tried your code but it's not working
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/19/13 10:40 PM (11 years ago)
Well, then move the image into your BT_Docs directory, or whichever directory your html file is in... Cheers! -- Smug
 
xtremeesolutions
Code is Art
Profile
Posts: 106
Reg: Nov 19, 2011
FootHill Ranch,...
6,610
like
06/19/13 11:51 PM (11 years ago)
Yes ,@Smug I have moved my image in Bt_Plugins directory. But still image is not displayed.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/20/13 12:14 AM (11 years ago)
Not the plugin directory. The same directory your HTML file is in. Quite possibly 'BT_Docs'. Look at this example: https://dl.dropboxusercontent.com/u/115208762/htmlpath.png Hope this helps clear it up a bit :) Cheers! -- Smug
 
xtremeesolutions
Code is Art
Profile
Posts: 106
Reg: Nov 19, 2011
FootHill Ranch,...
6,610
like
06/20/13 12:18 AM (11 years ago)
I am using Custom Html plugin and html code is in this screen and i'm giving image path on Bt_server.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/20/13 12:36 AM (11 years ago)
You're going to have to study directory paths. I guess I can't explain it to you, but that's your issue, and that's how you solve it. Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/20/13 06:40 PM (11 years ago)
One thing we may not have thought about... When you're 'moving' your image into the BT_Docs directory, are you doing this within Xcode, or in the finder? If you're moving it within Xcode, it isn't actually moving the file 'physically'. Only the reference location. And thus, the HTML will still not be able to see the file. So, in order for my instructions to work, you need to close Xcode, and 'physically' move the file from BT_Images to BT_Docs. Then restart Xcode. The file will probably show up red, because it's not where Xcode thought it should be. Just delete it (from within Xcode, reference only) and re-add it to the project, in the BT_Docs directory, not BT_Images. Cheers! -- Smug
 
Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
like
07/29/13 01:15 PM (10 years ago)
Hi i Have a similar Problem so i dont make new thread I used the ''custom HTML'' plugin to make a new screen Inside the option of this new screen i paste the code i have made in Dreamweaver and save it i had 2 pics <img src="image1.png"/> and <img src="image2.png"/> the problem is that cant see the pictures in my phone... just only the text and where the pictures should be is a grey border i have saved the pictures and in BT_Docs folder and in res/drawble folder in both had no result where the ''custom html'' plugin saves the html files??
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.