Images not showing - actual bug?

onealexharms's Avatar

onealexharms

04 Oct, 2024 06:38 PM

My picture shows in Obsidian, but Marked2 doesn't see it.

The picture is in the same directory as the .md file.
I tried using a full path, but that didn't fix it.
I downloaded Obsidian to see if it would recognize the image, and it did.
I used "toggle source view" in Marked2 and it shows as html.
The file on disk is as below.
Pasted directly from the file, which was originally created in vim:

![cover](a_wizard_of_earthsea.jpg "title")
Ged was the greatest sorcerer in Earthsea, but in...
  1. Support Staff 1 Posted by Brett on 04 Oct, 2024 08:03 PM

    Brett's Avatar

    I have tested this with my own image, both from Obsidian and externally
    edited, and have had no issue.

    - Can you attach a copy of the image in question for testing?
    - Please also attach the HTML export of the document
    - Have you tried this with other images?
    - Have you tested with both the MultiMarkdown and GFM processors?
    - Are you running any custom processor?

    -Brett

    On 4 Oct 2024, at 13:40, onealexharms wrote:

  2. 2 Posted by onealexharms on 04 Oct, 2024 08:07 PM

    onealexharms's Avatar

    I have tested with both processors, but no custom processors. I have also tested with several images in the same directory [edit: same as their .md file, not same as this one]. Forgot to mention that I have checked permissions as well.

    <p><img src="a_wizard_of_earthsea.jpg" title="title" alt="book" /><br/>
    Ged was the greatest sorcerer in Earthsea, but in his youth he was the reckless Sparrowhawk. In his hunger for power and knowledge, he tampered with long-held secrets and loosed a terrible shadow upon the world.<br/>
    This is the tumultuous tale of his testing, how he mastered the mighty words of power, tamed an ancient dragon, and crossed death&rsquo;s threshold to restore the balance.</p>

  3. 3 Posted by onealexharms on 05 Oct, 2024 04:01 PM

    onealexharms's Avatar

    Ooh boy.
    - It shows in an exported html as long as I don't embed it.
    - In the html _view_ when I inspect element, it shows the filename as "a_wizard_of_earthsea.jpg?v=nnnnnn" (where n is numbers)
    I think it's a legit bug.
    Edit: I had left off the extension

  4. Support Staff 4 Posted by Brett on 05 Oct, 2024 04:35 PM

    Brett's Avatar

    It shows without the extension? That would definitely be a bug…

  5. Support Staff 5 Posted by Brett on 05 Oct, 2024 04:38 PM

    Brett's Avatar

    I tested this right from Obsidian and had no issue. It's really hard to track down a bug I can't replicate. Could you paste in the result of Help->Report an Issue?

  6. 6 Posted by onealexharms on 06 Oct, 2024 02:35 PM

    onealexharms's Avatar

    Oh, no, not without the extension. That was an accident. I was pointing to the v=nnnnnn. But apparently it's supposed to be there?

  7. Support Staff 7 Posted by Brett on 06 Oct, 2024 02:46 PM

    Brett's Avatar

    The query string is to force a reload if the image is cached. Marked also watches embedded images for changes and updates the image in the preview if a change is detected. Adding a query string has no effect on the browser's ability to display an image, it just makes it think that it's a new image rather than a cached one.

  8. 8 Posted by onealexharms on 06 Oct, 2024 02:47 PM

    onealexharms's Avatar

    // Please enter a detailed description of the issue
    // Description of the issue:

    Images don't show up. See discussion on the support forum with Brett.
    Note: You may want to know this is an Intel i9 (the last one, dangit)

    // Please enter a list of steps required to reproduce the issue
    // Steps to reproduce:

    1. Create a .md document in vim with ![book](filename.jpg) where filename is an existing image in the same directory.
    2. View in Marked2, either processor.
    3. Note missing image icon.

    // If applicable please attach a sample document that causes the issue for you.

    // Configuration (do not edit)
    Marked 2 1067 (Mac App Store)
    macOS Version: 14.6.1
    ---
    additionalMathJaxConfig:
    allowPageBreakInCode: YES
    bookTxtIsLeanpub: NO
    summaryMdIsGitBook: NO
    codeIsPoetry: NO
    codeCanWrap: YES
    collapsibleHeadlines: NO
    convertGithubCheckboxes: YES
    convertGithubEmoji: YES
    convertYAMLToMMD: NO
    defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
    defaultPreviewStyle: 0
    defaultProcessor: Discount (GFM)
    enableMiniMap: NO
    excludeBlockQuotesFromCounts: NO
    excludeFootnotesFromCounts: NO
    excludeVerbatimFromCounts: NO
    excludeCaptionsFromCounts: NO
    folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
    githubNewlines: YES
    h1IsPageBreak: NO
    h2IsPageBreak: NO
    hrIsPageBreak: NO
    includeMathJax: NO
    includeKatex: NO
    limitTextWidth: NO
    mathNumberEquations: NO
    mathNumberEquationsSide: 0
    mathNumberEquationsAMSOnly: NO
    minimalJavaScript: NO
    outlineModeExtensions:
    permissionGranted: NO
    printHeaderBottomLeft:
    printHeaderBottomRight:
    printHeaderFirstPage: NO
    printFooterFirstPage: NO
    printHeaderTopLeft:
    printHeaderTopRight:
    processHTMLFiles: YES
    removeMetadataForPreview: NO
    removeYAMLHeaders: NO
    scrollToEdit: YES
    shouldDetectCritic: YES
    shouldHighlightMarkupErrors: NO
    shouldLoadCritic: NO
    syntaxHighlight: NO
    syntaxHighlightOnlyLang: NO
    useCustomMarkdownProcessor: NO
    customMarkdownProcessor:
    useCustomPreprocessor: NO
    customPreprocessor:
    useFirstH1AsPrintTitle: YES

  9. 9 Posted by onealexharms on 06 Oct, 2024 02:49 PM

    onealexharms's Avatar

    Yeah, I'm stumped. It seems unlikely, but is it possible it's an issue caused by my mac being an intel?

  10. Support Staff 10 Posted by Brett on 06 Oct, 2024 02:56 PM

    Brett's Avatar

    Ok, thanks for the debug info. Doesn't really offer any clues,
    unfortunately. I think you said if you used the HTML export and viewed
    the exported page in browser, it worked? That's so odd.

    Could you right click->Inspect element on the image again, locate the
    `<div id="wrapper">` element, right click that and select Copy->HTML.
    Then paste that into a response (as a code block if possible)? I'm
    grasping at straws here, but curious to see the actual markup it's
    producing.

    -Brett

    On 6 Oct 2024, at 9:47, onealexharms wrote:

  11. 11 Posted by onealexharms on 09 Oct, 2024 02:00 PM

    onealexharms's Avatar
    <div id="wrapper" style="max-width: none;">
    
                <p><img src="a_wizard_of_earthsea.jpg?v=100708" alt="book"><br>
    Ged was the greatest sorcerer in Earthsea, but in his youth he was the reckless Sparrowhawk. In his hunger for power and knowledge, he tampered with long-held secrets and loosed a terrible shadow upon the world.<br>
    This is the tumultuous tale of his testing, how he mastered the mighty words of power, tamed an ancient dragon, and crossed death’s threshold to restore the balance.</p>
    </div>
    
  12. Support Staff 12 Posted by Brett on 09 Oct, 2024 04:09 PM

    Brett's Avatar

    That looks 100% correct. And verify for me that the HTML export does show the image properly in a browser?

  13. 13 Posted by onealexharms on 09 Oct, 2024 08:33 PM

    onealexharms's Avatar

    It shows if I don't use 'cached' when I export. Otherwise it doesn't.

  14. Support Staff 14 Posted by Brett on 09 Oct, 2024 08:48 PM

    Brett's Avatar

    If you add another image to the same document using the same syntax, do either of them show up?

    Yes, I’m really grasping at straws here. In the surface this makes no sense and I’m unable to replicate.

    Thanks,
    Brett
    On Oct 9, 2024 at 3:33 PM -0500, onealexharms <[email blocked]>, wrote:

  15. 15 Posted by onealexharms on 10 Oct, 2024 02:06 PM

    onealexharms's Avatar

    I tried that, and also tried a creating a fresh doc in the Documents folder. I'm attaching a screenshot with everything showing. [Edit: I saw later that the screenshot shows me using the wrong file extension, but I repeated it with the right extension.]

    I think the next thing is to delete and re-download Marked2.

    If there was anything out there even remotely as good as Marked2, I'd just put my hands up and switch. :D But I know it might not be fixable with the info we have. So don't keep banging your head against it unless you want to.

    I'll let you know whether deleting and reinstalling works.
    Update: nope.

  16. Support Staff 16 Posted by Brett on 11 Oct, 2024 06:31 PM

    Brett's Avatar

    I doubt reinstalling is going to have any effect. If anything were going to magically work, it would be deleting the preferences and starting fresh, but I didn't see anything in your config that would be affecting it.

    Marked works a little magic on image links to make them trackable for changes, but given that the image path in the inspector palette was absolutely correct and valid, it's a total mystery why it wouldn't show up in the preview. Do any images work? Is it only images in the same folder as the document? Could there potentially be permissions issues that are preventing access? None of these seem likely, but have to explore options.

    One thing that might fix the issue is switching from the MAS version to the direct version. Under the Help menu you can click Crossgrade to get free license for the direct version. Let me know if that makes any difference. The only difference between the versions is that the direct version isn't sandboxed, which would solve permission issues if that's the problem.

  17. 17 Posted by onealexharms on 11 Oct, 2024 07:14 PM

    onealexharms's Avatar

    I definitely don't see any permissions issues, and also tried in the Documents folder. But yeah, switching from the app store version seems like a good idea. I must have been lazy setting up a new computer or something. :D

  18. 18 Posted by onealexharms on 11 Oct, 2024 07:19 PM

    onealexharms's Avatar

    Brett, I generated a license code, then lost it before I got the thing installed. :-/ I can't get it now without deleting, reinstalling from the app store, and then doing it all over. Could you send me one?

  19. 19 Posted by onealexharms on 11 Oct, 2024 07:20 PM

    onealexharms's Avatar

    A. I just realized I could use the trial. and
    B. OMG IT WORKED

  20. Support Staff 20 Posted by Brett on 11 Oct, 2024 07:23 PM

    Brett's Avatar

    Sent a new code to the email associated with this account.

  21. Support Staff 21 Posted by Brett on 11 Oct, 2024 07:24 PM

    Brett's Avatar

    Must have been a permissions issue, which is weird because it clearly had permission to open the Markdown file from that directory. Probably could have been solved by dragging the whole containing folder to Marked, which should have then requested the necessary user permissions. But as long as it's working now :)

  22. Brett closed this discussion on 12 Oct, 2024 04:12 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac