Skip to main content
QuintinSeegers
Legend
April 3, 2024
Answered

Image locations using absolute path instead of relative path (FM2022)

  • April 3, 2024
  • 2 replies
  • 1238 views

Our product manuals are in self-contained folders, e.g.

Product Name

- Common Images

- Manual A

  - Content Documents

  - Images

- Manual B

  - Content Documents

  - Images

 

These are stored on the network. However, because the network is accessed via VPN (working remotely), it is very slow. To get around this, the whole folder is copied to the local pc and worked on, then the whole folder is copied back to the network. However, we find that any images inserted (by reference) are using the absolute path, e.g. when the folders are copied to the local pc, images point to the images on the network. When the folders are copied back to the network, any images inserted while working on the document locally (inserted by reference from the local "images" folder) are still pointing to the local images.

 

Is there a way to resolve this so FM uses the relative path, e.g. Images used in Manual A will use the relative path \images\ or ..\Common Images\, rather than the absolute path c:\Product Name\Manual A\Images\ or c:\Product Name\Common Images?

 

    This topic has been closed for replies.
    Correct answer QuintinSeegers

    re: What happens in the case where the Page Layout and Reference Pages are imported from another document?

    That (Import Formats) is typically only done as a live operation, and not automatically, and usually not often (only when the template changes). If the author navigates to the template file, abs or rel path, it will simply work.

    I suppose it is possible to script this and have it run routinely, but in that case you'd need to consult with the script author.

    I normally keep the template.fm file for a project in the same ./dir as the .book & .fm files, so not much nav is required to do a bulk re-import of formats.


    @Bob_Niland 

    quote

    re: What happens in the case where the Page Layout and Reference Pages are imported from another document?

    That (Import Formats) is typically only done as a live operation, and not automatically, and usually not often (only when the template changes). If the author navigates to the template file, abs or rel path, it will simply work.

    I suppose it is possible to script this and have it run routinely, but in that case you'd need to consult with the script author.

    I normally keep the template.fm file for a project in the same ./dir as the .book & .fm files, so not much nav is required to do a bulk re-import of formats.


    By @Bob_Niland

    I think you may have pointed out the cause of my 'issue'. Somewhere a Save As must have been used instead of just copying the files, resulting in the absolute paths being used. I'll need to investigate further because it's clearly caused by "user" error (someone in the team must have encountered an ID10T error 🤭)

    2 replies

    frameexpert
    Community Expert
    Community Expert
    April 4, 2024

    As long as Product Name and everything under it is on a single network volume and you copy the whole thing to a local PC, all of the images should resolve.

    www.frameexpert.com
    QuintinSeegers
    Legend
    April 4, 2024

    @frameexpert 

    A follow-up question. What happens in the case where the Page Layout and Reference Pages are imported from another document? How is the pathing resolved in those situations? Absolute or still relative?

    Community Expert
    April 4, 2024

    Hi,

    FrameMaker always uses relative paths, as long as you do not have to go up to the root directory.

    When you copy a file from another FrameMaker file, FrameMaker will keep the path to the copied file. (I admit that I noticed that sometimes FrameMaker uses the path to other image files of the target FrameMaker file instead of the path of the copied image file.)

    And I work via VPN from home and do the same as you: Copy everything to my local laptop and work from there and copy everything back to the server later. No CMS or someting like that. And I had not had your issues.

    Best regards, Winfried

    Bob_Niland
    Community Expert
    Community Expert
    April 3, 2024

    Are you always working remotely via VPN, or sometimes working "locally" on the enterprise network?

    What does a fully qualified path to a typical imported asset look like on each?
    I presume the VPN presents a transparent virtual directory to FM (or is there a CMS involved here too).

     

    When importing, how done?

    Type in relative path?
    Navigate relative {..\ up only as far as necessary, then down}
    Type in explicit relative path?

     

    In general, avoiding directory roots [leading / or \] and avoiding server names [drive letters, network share IDs] is necessary to preserve directory-relative. Where that can't be done, using symlinks (shortcuts on Windows) can create paths that are absolute but look relative to FM.

    QuintinSeegers
    Legend
    April 3, 2024

    @Bob_Niland 

    Are you always working remotely via VPN, or sometimes working "locally" on the enterprise network?

    What does a fully qualified path to a typical imported asset look like on each?
    I presume the VPN presents a transparent virtual directory to FM (or is there a CMS involved here too).

    I always work remotely via VPN. Others in the organisation have a mixture - sometimes in the office (locally to the network), sometimes remotely connecting via VPN.

    No CSM involved. Just a good ol' fashioned VPN connection to the corporate network (as a whole, not exclusively to FM).

     

    When importing, how done?

    Type in relative path?
    Navigate relative {..\ up only as far as necessary, then down}
    Type in explicit relative path?

     

    I should probably have mentioned that we used Structured FM (not DITA), so images are inserted using an Image-type element, which brings up the same window as using File > Import > File . The option Import by Reference is always selected.