images breaking on preview automatic refresh

George Dinwiddie's Avatar

George Dinwiddie

Sep 18, 2020 @ 02:27 PM

// Please enter a detailed description of the issue // Description of the issue: Preview loses the images when auto-refreshing after a file edit. An explicit CMD-R refresh restores the images.

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

  1. Open a markdown file containing images
  2. CMD-E, edit the file, and save chages
  3. Marked 2 refreshes the preview, but without the images

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

// Configuration (do not edit) Marked 2 1007 (Direct)

macOS Version: 10.14.6

additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 0
defaultProcessor: MultiMarkdown
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: NO
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: 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: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES

  1. Support Staff 1 Posted by Brett on Sep 18, 2020 @ 02:55 PM

    Brett's Avatar

    I'm unable to replicate this issue on my end, which makes tracking it down significantly more difficult.

    While the preview is showing broken images, could you right click on one of the broken image icons and choose "Inspect Element" and send me a screenshot of what you see there? Then hit refresh to restore the image and repeat the process? If you'd like to avoid screenshots, you can also just hit ⌘C while the img element is highlighted and paste the two results into a code block in your response.

    Thanks,
    Brett

  2. 2 Posted by George Dinwiddi... on Sep 18, 2020 @ 03:31 PM

    George Dinwiddie's Avatar
  3. 3 Posted by George Dinwiddi... on Sep 18, 2020 @ 03:39 PM

    George Dinwiddie's Avatar

    Here's the text copy, if that helps
    broken image: <img
    src="file:///Users/george/Documents/iDIA/presentations/Are%20We%20There%20Yet?/slides/Slide2.png?v=106655"
    alt="Slide2">
    working image: <img
    src="file:///Users/george/Documents/iDIA/presentations/Are%20We%20There%20Yet%3F/slides/Slide2.png?v=103240"
    alt="Slide2">

    Besides the "v" parameter changing, I notice the "?" in the directory
    name is not URL-encoded in the broken one.

      - George

  4. Support Staff 4 Posted by Brett on Sep 18, 2020 @ 03:47 PM

    Brett's Avatar

    You're correct, it appears in the broken version that the ? is not being translated to a percent-encoded version as it should be. I'll have to dig in to figure out where this is failing.

    It appears you named the parent directory with a question mark, so the obvious workaround right now is just to remove that question mark from the directory name.

    In the meantime, I'll try to figure out where that's not being encoded properly (or being prematurely decoded).

  5. 5 Posted by George Dinwiddi... on Sep 18, 2020 @ 03:52 PM

    George Dinwiddie's Avatar

    Renaming the directory works. Thank you for helping me figure out what
    was wrong.

      - George

  6. Support Staff 6 Posted by Brett on Sep 18, 2020 @ 03:53 PM

    Brett's Avatar

    Sure thing. I've added the bug to my list for the next update. Thanks
    for reporting!

    -Brett

Reply to this discussion

Internal reply

        Formatting help / Preview (switch to plain text)

        Already uploaded files

        • Screen_Shot_2020-09-18_at_10.12.48_AM.png 726 KB
        • Screen_Shot_2020-09-18_at_10.13.50_AM.png 85.3 KB
        • Screen_Shot_2020-09-18_at_10.14.09_AM.png 63.6 KB

          You can attach files up to 10MB

            If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

              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