View Full Version : img src
scandro
04-16-2001, 11:37 AM
Hi all:
I'm new here, fresh from Geocities.Been with them for 3 years. I've had 3 different sites with them and of course, because of their user-friendly file-manager interface, there has never been a problem. What would be nice to see would be a similar user friendly hassle-free file manager with HR. Anyway, can anybody tell me the file path to use when inserting image files on a page. This is incredible! I have tons of HTML experience but I haven't figured out (with the HR server) what file path to include. Another very simple questions to some of you all-knowing gurus out there: now that I have my own domain name avtivated, why does it point to my "public_html" file? Should I change this to "index.html" ? Any other suggestions or comments regarding why I'm presented with the "parent directory" after accessing my account, would be greatly appreciated.
"public_html" is your server root directory, from which all your files are served e.g. index.htm
If your images are kept in your "public_html" dir it would be <img src="your_masterpiece.gif">
Rusty
04-28-2001, 12:30 AM
You may want to invest in a program that takes care of your site structure like Adobe Golive5 or Dreamweaver. They create a directory for your images with links to their location. HR gives you the flexability to set up your site with any product or code you want. You just have to learn a few more steps like DCE has just shown you.
Rusty
www.dvkit.com
Harold Trull Jr
04-30-2001, 01:39 AM
or you can just code your image src to a 'relative directory path' where your store your images, such as
./images/yourimage.gif
where 'images' is the directory you want to store your images in. Using a single period indicates the current directory (which would be public_html).
Aquaplex
05-07-2001, 07:02 PM
Personally i think its better to use an absolute link to your image or any other file for that matter.
Simply if your images are in a directory (in your public_html directory) called "images" you woild link like this
<img src="http://www.yourname.com/images/file.jpg">
where "file.jpg" is your image file name
if you have just uploaded you images directly in to the public_html directory, you would link as follows:
<img src="http://www.yourname.com/file.jpg">
where "file.jpg" is your image file name
MSteenberg
05-07-2001, 07:25 PM
Originally posted by Aquaplex
Personally i think its better to use an absolute link to your image or any other file for that matter.
The only issue with this is a slightly slower response time to full links (vs. relative links) for certain browsers -- especially those that run through some cache systems. Certain caches require a new access route to the host server be initiated for each http://... reference, whereas relative links are assumed to be running through the current session and do not require a new connect to the host.
Thus linking to a new HTML page via:
<A HREF="subfolder/page.html">
will be substantially faster for users clicking on it from some cache systems than:
<A HREF="http://www.yourdomain.com/subfolder/page.html">
Also, relative links can be initiated without a dot-foreslash (./) to indicate the current directory. For all but the very oldest of UNIX web servers, the current directory is assumed. Thus one can simply begin with the subfolder name, without any leading information.
For example, if you are in your main web directory (public_html) and wish to link to the file "page.html" in the subdirectory "subfolder", you can use:
<A HREF="subfolder/page.html">
as opposed to:
<A HREF="./subfolder/page.html">
Matthew
Harold Trull Jr
05-14-2001, 07:03 PM
I personally prefer relative paths. If I move the site to another host or domain I do not have to recode my pages. This is also beneficial for those that have a 'test' domain to check the site before making it 'live'.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.