Re-importing HTML source files with graphics - Cloud

Import content

How existing File objects are matched to HTML source file images

Metadata is assigned to a File object at the first import. The metadata value is the image file name specified in the HTML source file's image tag. When content is re-imported, Author compares the file name in the image tag with File objects in the Library. When Author finds a match (based on the object's metadata assignment) it uses the existing File object. If Author cannot find a match it creates a new File object.

Reusing an image

Images can be reused multiple times in a single HTML source file, or reused across a number of HTML source files. When the HTML source file is imported into the library, Author creates the File object for the first instance it finds, and assigns metadata to the File object using the file name as. As the import continues, whenever Author finds the file name reference in the HTML source file it matches the existing File object using the metadata. So long as the image file name in the HTML source file is the same the File object can be reused.

Embedded images

When using Embedded images, before you begin importing ensure the import profile uses the correct File object template, and the option to embed all imported graphics is selected.

When you re-import content you can overwrite the existing embedded images that are stored in the database, however, the embedded File objects must be kept in the import folder. If the File objects are moved to a different folder in Author then new File objects will be created in the import folder when the HTML source files are re-imported.

Updating the graphics used by embedded File objects:

  • Modify the source image in your image editor, saving the file using the same file name and format. The code in the image tag is not altered.
  • Move the modified image to the HTML source file folder, replacing the original image file.
  • Re-import the HTML source files. The embedded File object is updated with the modified image.

Linked images

When using Linked images, before you begin importing ensure the import profile uses the correct File object template, the option to "Embed all imported graphics" is not selected, and the graphics folder exists at the path assigned in the template.

  • On the first import, when the image is used in the library for the first time, the image is copied from the folder containing the HTML source files to the graphics folder defined in the linked image File object template. When the image has been added to the graphics folder it is displayed in the topic and the File object.
  • If the image file has been updated between imports, Author uses the metadata to identify the correct File object but the image is not copied to the graphics folder as part of the re-import process. Ensure you move the modified copy of the image to the graphics folder so it can be used by the File object - this action must be completed manually.

Modifying image names between import jobs

If you modify the image and save the file with a different name or format Author-it will create at new File object when you re-import the source content. This is because Author is no longer able to match the image file name in the HTML source file to metadata assigned to an existing File object. As an example, changing the file name from "image.gif" to "image2.gif", or changing the format so "image.gif" becomes "image.png."