Skip to main content
QuintinSeegers
Brainiac
April 3, 2024
Answered

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

  • April 3, 2024
  • 2 replies
  • 1212 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
    Adobe 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.

    QuintinSeegers
    Brainiac
    April 4, 2024

    @frameexpert  That's what I thought was supposed to happen, but it doesn't seem to be the case. When I copy the files back to the network and open them from the network location and check the file name in the Object Properties, it's referencing the image on my local drive. The same thing is happening for any images on the Reference Pages.

    QuintinSeegers
    Brainiac
    April 4, 2024

    How are you copying the files? If you do File > Save As to another drive, it will make the references absolute to the original drive.


    The whole folder is copied back and forth - each file isn't opened and saved to the local/server location.

    Bob_Niland
    Adobe 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
    Brainiac
    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.