tag:support.markedapp.com,2011-09-11:/discussions/problems/124762-viewing-local-images-when-using-atom-or-sublime-text-and-markedMarked: Discussion 2019-02-23T23:23:22Ztag:support.markedapp.com,2011-09-11:Comment/404784552016-08-06T20:26:24Z2016-08-06T20:26:24ZViewing local images when using Atom or Sublime Text and Marked<div><p>I'm guessing it's a permissions issue. Are you using the App
Store<br>
version? In that case you'd need to make sure that Marked had
been<br>
granted permissions for the folder containing images. The easiest
thing<br>
to do is just drop your home folder on the Marked icon and
grant<br>
permissions when it asks. That will give access to everything
in<br>
~/alex/.</p>
<p>If that's not the issue, you can try right clicking on a broken
image,<br>
choosing Inspect Element, and seeing if there's any more useful
info<br>
provided in the inspector.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-06T21:41:51Z2016-08-06T21:41:52ZViewing local images when using Atom or Sublime Text and Marked<div><p>Hi Brett,</p>
<p>Thanks. That did the trick. Glad it was an easy fix.</p>
<p>Is there any way to set relative links too? I read your article
about doing that with nvALT. Can it be done with Marked if
I’m writing in Atom?</p>
<p>Of course, once BitWriter is out, I’ll do all my plain
text there, and there won’t be a problem :)</p>
<p>Thanks for all your help.</p>
<p>-Alex</p></div>Alexander Chamessiantag:support.markedapp.com,2011-09-11:Comment/404784552016-08-06T22:06:52Z2016-08-06T22:06:52ZViewing local images when using Atom or Sublime Text and Marked<div><p>Relative links are relative to wherever the watched file is
located.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-11T23:24:21Z2016-08-11T23:41:59ZViewing local images when using Atom or Sublime Text and Marked<div><p>I'm getting the same issue with images not appearing (actually
they blink then disappear and give the missing image icon)</p>
<p>I tried dropping my home directory on Marked but the app crashes
when I do that.</p>
<p>I'm using the trial version, btw. Not MAS. Editing in Sublime
Text 3.</p></div>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-11T23:36:07Z2016-08-11T23:42:38ZViewing local images when using Atom or Sublime Text and Marked<div><p>thought I could delete this duplicate... but nope!</p></div>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T20:00:04Z2016-08-13T20:00:04ZViewing local images when using Atom or Sublime Text and Marked<div><p>@brianthemacguru this sounds like a separate issue. Right click
on the broken image and "Inspect element". See what the path shown
is, and let me know that vs. what you had in your document. It
sounds like one of the javascripts that runs (likely related to
image change tracking) is breaking the path.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T20:08:54Z2016-08-13T20:08:54ZViewing local images when using Atom or Sublime Text and Marked<div><p>Inspected element</p>
<p><img alt=""></p>
<p>HTML</p>
<img src="jim-hensons-dinosaurs.jpg" alt="">
<p>From Sublime/Focused</p>
<p><img src="jim-hensons-dinosaurs.jpg" alt=""></p>
<p>It's weird because it blinks in for a half second then
disappears.</p></div>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T20:14:47Z2016-08-13T20:14:47ZViewing local images when using Atom or Sublime Text and Marked<div><p>If you open Terminal and run:</p>
<pre>
<code>open</code>
</pre>
<p>
'file:///Users/master/Documents/Github/documentation/Getting%20Started/jim-hensons-dinosaurs.jpg'</p>
<p>Does it open the file (probably in Preview) properly?</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T20:25:34Z2016-08-13T20:25:34ZViewing local images when using Atom or Sublime Text and Marked<div><p>nope.</p>
<p>Maybe this helps</p></div>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T22:55:08Z2016-08-13T22:55:08ZViewing local images when using Atom or Sublime Text and Marked<div><p>Can you inspect the image in the browser and see what path it's
at? It<br>
looks like it's previewing from a tmp folder…</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T22:58:12Z2016-08-13T22:58:12ZViewing local images when using Atom or Sublime Text and Marked<div><img></div>
<br>
<div class="bloop_sign"></div>
<br>
<p class="airmail_on">On August 13, 2016 at 3:55:10 PM, Brett
(<a href=
"mailto:tender2+d1d364b2b9@tenderapp.com">tender2+d1d364b2b9@tenderapp.com</a>)
wrote:</p>
<blockquote type="cite" class="clean_bq">
<div>
<div><span>// Please reply above this line<br>
==================================================<br>
From: Brett (Support staff)<br>
Subject: Viewing local images when using Atom or Sublime Text and
Marked<br>
<br>
Can you inspect the image in the browser and see what path it's at?
It<br>
looks like it's previewing from a tmp folder…<br>
<br>
-Brett<br>
<br>
<br>
<br>
View this discussion at our support site online: <a href=
"http://support.markedapp.com/discussions/problems/124762-viewing-local-images-when-using-atom-or-sublime-text-and-marked">
http://support.markedapp.com/discussions/problems/124762-viewing-local-images-when-using-atom-or-sublime-text-and-marked</a><br>
<br>
---<br>
<br>
To unsubscribe and stop receiving emails from <a href=
"http://support.markedapp.com">http://support.markedapp.com</a>,
visit <a href=
"http://support.markedapp.com/unsubscribe/df258a182bca0f89f2a75dcbfeb1442fca228f2a">
http://support.markedapp.com/unsubscribe/df258a182bca0f89f2a75dcbfeb1442fca228f2a</a><br>
</span></div>
</div>
</blockquote>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T23:00:37Z2016-08-13T23:00:37ZViewing local images when using Atom or Sublime Text and Marked<div><p>Ok, so is the actual image in the same folder as the Markdown
file?<br>
Because what Marked is showing does not include that last How do
I<br>
install WordPress folder in the path.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T23:04:35Z2016-08-13T23:04:36ZViewing local images when using Atom or Sublime Text and Marked<div><p>yes. the image is in the same directory (i sent the screenshot
of the<br>
finder with all the others)</p></div>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T23:11:43Z2016-08-13T23:11:43ZViewing local images when using Atom or Sublime Text and Marked<div><p>I'll have to look further into why it's choosing to truncate the
end of that path, but I'm willing to bet it has a lot to do with
the question mark in the folder name. Try removing that and viewing
again, let me know if it makes a difference.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T23:14:17Z2016-08-13T23:14:17ZViewing local images when using Atom or Sublime Text and Marked<div><p>THAT WAS TOTALLY IT!</p></div>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T23:19:51Z2016-08-13T23:19:51ZViewing local images when using Atom or Sublime Text and Marked<div><p>For reference, a question mark is a reserved unix character
(like the<br>
asterisk) that isn't <em>technically</em> valid in file paths. The
HFS<br>
filesystem on the Mac allows it, and in general it doesn't cause
issues.<br>
I'll need to check the code to see where Marked is taking it upon
itself<br>
to break that, but it might be worth averting some future
software<br>
issues by avoiding those reserved characters in folder and file
names.<br>
This is absolutely Marked's fault though, thanks for pointing it
out.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T23:22:21Z2016-08-13T23:22:21ZViewing local images when using Atom or Sublime Text and Marked<div><p>Sweet. I do software support, too. For Realmacsoftware, so I
totally<br>
understand how user issues help improve software.</p>
<p>Enjoy the rest of your weekend, Brett.</p>
<p>Cheers<br>
Brian</p></div>brianthemacgurutag:support.markedapp.com,2011-09-11:Comment/404784552016-08-13T23:31:11Z2016-08-13T23:31:11ZViewing local images when using Atom or Sublime Text and Marked<div><p>Nice, I love Realmac :).</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/404784552019-02-23T20:28:05Z2019-02-23T20:28:08ZViewing local images when using Atom or Sublime Text and Marked<div><p>This is an old discussion but for people having similar issues on OS X (like me) I just want to add that this issue does not seem to be fixed as of yet (version 2.5.30). Having # in a folder name is equally bad and will break the ability of Marked 2 to properly determine the base folder, and therefore all relative path links to files will be off.</p>
<p>Took me hours to troubleshoot because it's not an obvious error (to me), is specific to folder names (not file names) and only while loading the base file (afaik). I haven't seen something similar in other programs before, which makes it even harder to diagnose.</p>
<p>For example:<br>
If the md file that is previewed is in a path like:</p>
<p>somefolder/somefolder2/#somefolder/</p>
<p>the file will be loaded without issues but its base path will erroneously be set to:</p>
<p>somefolder/somefolder2/</p>
<p>Any relative file paths for images etc. within the md file will now be off.<br>
So an image file in</p>
<p>somefolder/somefolder2/#somefolder/imagefolder/</p>
<p>that is referenced as</p>
<p><img src="imagefolder/test.png" alt=""></p>
<p>will not be found by Marked because it's looking in</p>
<p>/somefolder/somefolder2/imagefolder instead.</p>
<p>HOWEVER, there is an interesting "solution", one has to set the relative path as<br>
<img src="#somefolder/imagefolder/test.png" alt=""> because when processing Markdown, it seems like Marked doesn't have an issue with the # in the folder name (also FYI, Marked is fine with # in file names).</p>
<p>(Of course the "solution" I present should not be used because it will mess up relative file paths for all other programs. It's also not best practice to have # or similar reserved characters in folder or file names, but it's tolerated by OS X)</p>
<p>I like Marked a lot, I hope that gets fixed at some point, or alternatively it might be helpful to mention this somewhere in the FAQs.</p></div>Henmantag:support.markedapp.com,2011-09-11:Comment/404784552019-02-23T23:23:22Z2019-02-23T23:23:22ZViewing local images when using Atom or Sublime Text and Marked<div><p>The base path is an html attribute in this case. A hash in an html value<br>
indicates a page position and is ignored in paths. Using a hash in a<br>
path name on any filesystem is highly inadvisable. My recommendation is<br>
to never use a hash in a filename if one can avoid it…</p>
<p>-Brett</p></div>Brett