3

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?

  • have you tried the QConsolidate plugin? I'm not sure how well it copes with assorted assets like images, though. – Steven Kay Aug 21 '16 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 Aug 22 '16 at 19:55
1

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.

  • works on windows as well – eurojam Oct 26 '18 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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