Skip to main content

[BUG] Local images do not appear in preview pane

Completed

Comments

4 comments

  • Fletcher Penney

    There are a couple of things involved:

     

    1. macOS restricts application access to files to those that are explicitly opened by the user.  In this case, that means that access is limited to the folder and its contents.  So `../../foo.png` won't work if it means that the image is outside of the root folder in a sandboxed application, regardless of how the preview is implemented.

     

    2. Secondly, due to limitations with Apple's WKWebView, nvUltra uses a built-in webserver to drive the preview.

     

    3. There is an error in your `Same folder` test.  When you fix the image filename, it works properly for me.

     

    4. The `Subfolder/Relative images` test works fine for me (again, assuming you open the root folder `test_images`)

     

    Both of the first two factors mean that `file://` links won't work in the preview.  But proper use of relative links are fine.  When you drag an image to the editor, it should properly insert the relative path.  Basically, if the image you reference is visible in the note list, it is accessible in the preview.

     

    If you have an example where this is not the case, definitely let us know!

    0
  • AmberV

    Oops, yeah I uploaded a slightly older version of tha test folder, with a broken image reference (the same folder one was meant to demonstrate a working example anyway). Well upon looking at the relative image today, I might have just run into an odd cache issue or something, having started out the test with the relative image *outside* of the main folder. It's working fine now after a fresh start.

    Understood regarding sandboxing and absolute links. Is that going to be a limitation with the direct-sale version as well?

    0
  • Fletcher Penney

    We have not decided exactly how nvUltra will be sold yet (App Store, direct, both, something else).

     

    But again, it's a combination of points 1&2 that lead to the limitations, so these factors would affect all versions, until WKWebView functionality no longer requires a built-in web server.  Then it *might* be feasible to change the underlying preview mechanism.  Based on recent history, I wouldn't hold my breath waiting on Apple though.

    0
  • Fletcher Penney

    I'll mark this as completed, but if you find a non-working example reach back out.

     

    Thanks!

    0

Please sign in to leave a comment.

Powered by Zendesk