Saving a document with images
When you insert an image into a Web document, the image itself is not actually saved in the document. Instead, an image tag is inserted into the document’s HTML source code, and this tag specifies the location of the image file. The location might be specified in one of the following ways:
- as a relative path from the document’s location to the image file’s location (on the same drive)
- as a file-type URL containing an absolute path to the image file, if it is on another drive or in a network folder
- as an Internet URL, if the image is on a Web site
When you open the document in a browser, the browser reads the image tag, finds the image file at the specified location, loads the image, and displays it in the document.
This system of storing image files separately from the documents that use them generally works very well and allows for great flexibility, but it can lead to problems when you publish a document that uses images, if you are not careful. These problems generally fall into three types:
- If you inserted an image from a folder on the same drive as the document, you must make sure to upload the image to the same relative location on the remote site (relative to the document). Otherwise, the image will not display.
- If you inserted an image from a different drive or from a network folder, the image will not display because the absolute path that specifies its location will be invalid with respect to the remote site’s file system.
- If you inserted an image using an Internet URL, your users’ Web browsers will always retrieve the image from that URL rather than from your own site. This can cause bandwidth problems for the site hosting the image and can lead to complaints from that site’s owners if you did not receive permission to host the image on their site.
To help avoid such problems, when you first save a document after inserting one or more image files, Namo WebEditor may display the following dialog box, which lets you decide how Namo WebEditor should handle the newly inserted images:
The Resource File Handling dialog box
The four options file handling options are described below:
- Copy the files to the document folder: If you choose this option, Namo WebEditor will copy the images to the document’s own folder and convert the image URLs to just the images’ file names. (This is the default option.)
- Maintain existing URLs to the original file locations: If you choose this option, Namo WebEditor will not copy the images, and it will leave the existing image URLs as they are.
- Use relative URLs to the original file locations: If you choose this option, Namo WebEditor will not copy the images, but it will convert any absolute URLs to relative URLs wherever possible. (Note that file-type URLs pointing to files on another drive or a network folder cannot be converted to relative URLs.)
- Copy the files to another folder or choose action for each file: If you choose this option, Namo WebEditor will open the Resource File Manager dialog box, allowing you to specify another folder to which to copy all the images or to specify an action independently for each image.
In most cases, you should choose the default option, allowing Namo WebEditor to copy the image files to the document folder. This way, you can make sure the document does not contain any file-type URLs that will not work on the Internet. If the document includes images inserted from another drive or a network folder, it is strongly recommended that you choose either the first or the third option.
If you choose to copy an image file to the document folder, and you later remove the image from the document, Namo WebEditor will not delete the copied image file.