Phanith NY
← FlowMD guides

Fix Markdown relative image paths on Mac

By Phanith NY ·

Start your image path from the folder that contains the Markdown file. If trip.md is next to an images folder containing route.png, write ![Route map] followed immediately by (images/route.png). Keep that folder alongside the document when you move or share it.

Fix Markdown relative image paths on Mac | FlowMD guide

In Finder, place trip.md and the images folder inside the same project folder. Open images and confirm that route.png is there. The path images/route.png describes one step into that folder and then the image itself.

If trip.md moves into a notes subfolder while images stays where it was, the route changes. In a renderer that permits access to parent folders, ../images/route.png goes up one level before entering images. For Finder Quick Look in FlowMD, keep the image inside the Markdown document’s folder or a subfolder.

Check the capitalization and extension character by character. A file called route.PNG or route-final.png has a different name from route.png. Also confirm that you can open the local image directly from its folder.

Move the entire project folder if a colleague needs a copy. Sending trip.md on its own leaves the relative path in the text but removes the image it refers to.

Compare the editor and Finder previews with FlowMD

Open the saved Markdown file in FlowMD and check its live preview beside the link you edited. Then select the saved document in Finder and press Space to check FlowMD’s Quick Look preview with the local image.

If Finder still shows an older version, save the Markdown document and reopen the preview. If one preview differs from the other, keep the document and image in the small folder example so you can isolate the renderer from the original project.

Questions

Can I link to an image one folder above my Markdown file?

Use ../ in renderers that support parent paths. For FlowMD’s Finder preview, keep the image inside the document’s folder or a subfolder.

Can I share just the Markdown file and keep the local image visible?

Include the image files and preserve their locations relative to the Markdown file, for example by sharing the project folder as a ZIP.

Sources

Download FlowMD