Meteor - phantomjs rendering of public assets
<p>I am working on a Meteor project where I need to generate a PDF export of a section from the page.
I use webshot to generate the export.
A recent requirement is to use a public static asset - a logo image - in the export.
I worked around making css assets available to phantomjs by reading all the css files and copying their content into style tags in the HTML doc I let webshot consume. That works fine.
For the images, I replace the "./images/" pattern in the HTML with the full path to the images folder on the server using</p>

<pre><code>const buildPath = path.resolve('.').split(path.sep + 'server')[0];
const imagePath = buildPath + '/web.browser/app/images/';
</code></pre>

<p>which runs on the server. The image doesn't show up. 
When I open the generated HTML (I save it for debugging) at any place on my dev machine, the image path is resolved fine, and I get the image.</p>

<p>What is the right way to access those static assets in phantomjs?</p>