4

I'm sharing an entire map project with a client so they can eventually print off an atlas. I've managed to get all the layers and icons to work correctly with relative paths, but the atlas contains images. These don't appear when the client opens the project. Meanwhile, if I truncate the image path to a relative one, the images won't load in my local project.

This seems to be an updated version of this question, and I would also like to avoid modifying startup.py. I notice that I could create an expression to use for the image path, is there some combination of functions that would work for this?

2
  • have you tried the QConsolidate plugin? I'm not sure how well it copes with assorted assets like images, though.
    – Steven Kay
    Commented Aug 21, 2016 at 22:50
  • @StevenKay thx for the suggestion. Seems like there's minimal documentation for it, and it focuses on consolidating layers, not assets. Everything already is in the appropriate folder, but the absolute path will change on different computers
    – raphael
    Commented Aug 22, 2016 at 19:55

1 Answer 1

3

As mentioned in the question, I noticed there's an expression builder option next to the image source. Looking under the variables drop down I noticed an option named @project_folder with description

Folder for current project.

So I constructed a concatenation for the image source like.

@project_folder || '/images/image.png'

This worked locally, haven't tested it on the client's Windows machine yet.

1
  • works on windows as well
    – eurojam
    Commented Oct 26, 2018 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.