Here is my situation. I am in the process of redesigning a static site (www.inwoodiowa.com) for a local community group. I am a newbie to Drupal, but I know xHTML & CSS. I have Drupal running on my local PC for a test site, it is installed and working fine. I'm in the process of posting a series of static pages. I have the input format set to Full HTML so I can layout these static pages with HTML. My problem has to do with placing images in the HTML content, more specifically how to use the img tag to place images on the pages from my PC, but will still work when I upload the site to a live host. I've read the posts about img_assist and TinyMCE, but that is not what I am looking for. I think this should be a pretty basic question, am I missing something?
Where (on my local PC) should I place images that I want to use on static pages with Full HTML?
How do I format my img src tag to reference those images, and that will still work when I upload my site to a live host?
The img tag works fine if I reference an image from the web, but it won't find the images on my local PC.
Currently I have the images in the folder C://www/drupal/files/images. Here is how I think the code should look:
<img src="files/images/cityhall.jpg">
But this doesn't seem to work. Please help.
Comments
re: HTML image tags in page content
I believe you'll need to add a leading / in relative paths like so:
<img src="/files/images/cityhall.jpg">try that and see if it works.
--You talk the talk, but do you waddle the waddle?
Still doesn't work
What a quick reply, thanks so much. But it's still not working. I can't seem to get relative paths to work on my body content (with Full HTML enabled). The image tag works with absolute paths, but not relative tags. Can anyone help? I'm working on a test site on a local host (my home PC with windows XP).
re: images still don't work
Well, since you're using windows I don't reckon permissions is a problem. Try adding drupal to the start of the path, like
<a href="/drupal/files/images/picture.jpg">--You talk the talk, but do you waddle the waddle?
Might work, but still will have problem
Thanks again for the quick reply. I haven't tried that yet, but even if it does work when I upload my site to a real host my path will change because I will not be uploading the folder "drupal", just the contents of the drupal folder. Otherwise I might as well use absolute paths.
Did it work?
I am also facing the same issue. Don't quite know how would I resolve it. Did you find a way out?