Keep Markdown Diary Images Working After Moving the Folder
To keep local photos in a Markdown diary from breaking when you move it, store the images inside the diary folder and link to each one with a relative path from the note that uses it. Then move or copy the whole folder while preserving its internal layout, open the moved note in your usual Markdown viewer, and check that the sample images render. A path that works in one editor is not proof that every viewer will resolve it the same way.
What a relative image path means
Markdown image syntax uses an exclamation mark, alt text in square brackets, and an image destination in parentheses. For example,  points to an image by describing its location relative to the Markdown file. The CommonMark specification illustrates image destinations such as train.jpg, and the Markdown Guide documents the same basic syntax. CommonMark: Images Markdown Guide: Basic Syntax
A relative path is useful for moving a diary because it describes a relationship between files, rather than naming a particular location on one computer. If the note and image move together without changing that relationship, the path still points to the same image. An absolute location such as /Users/sam/Pictures/blue-mug.jpg or C:\Users\Sam\Pictures\blue-mug.jpg names a specific machine location; copying the diary to a different drive or computer can make it invalid.
Choose a folder layout that travels together
For a diary with notes organized by year, one practical layout is to keep a shared image folder beside the year folders:
text Diary/ ├── images/ │ ├── blue-mug.jpg │ └── garden-bed.png ├── 2025/ │ └── 2025-04-12.md └── 2026/ └── 2026-09-30.md
From Diary/2026/2026-09-30.md, the path to blue-mug.jpg is ../images/blue-mug.jpg: go up one directory from 2026, then enter images. The Markdown line could be:
md 
If each year’s images belong only to that year, an adjacent subfolder is also easy to reason about:
text Diary/ ├── 2026/ │ ├── images/ │ │ └── garden-bed.png │ └── 2026-09-30.md
Then the note can use . These examples depend on the displayed note location. Count the directories between the note and the image; do not guess the number of ../ segments.
Write the link from the note’s point of view
Begin with the Markdown file’s folder, then walk the directory tree to the image. A filename-only destination such as photo.jpg means the image is alongside the note. images/photo.jpg means it is in an images subfolder beside the note. ../images/photo.jpg means go up one level first. This rule gives a concrete way to calculate the link before trying it in the viewer.
Keep names straightforward when practical: for example, 2026-09-30-garden.jpg. Exact spelling and capitalization matter on many file systems, and a typo or case mismatch can be enough to make an image unavailable. Spaces and punctuation may also be handled differently by Markdown applications. The Markdown Guide notes that applications do not all agree about spaces in URLs and recommends %20 for compatibility. If an image name contains spaces, a simple filename avoids that uncertainty; otherwise, use the encoding or quoting style supported by your viewer and verify it there. Markdown Guide: Link Best Practices
Move the diary without changing its internal map
Treat the diary folder as a unit. Copy or move the enclosing Diary/ folder with both the .md notes and the images, rather than moving only the notes or leaving the images behind. Relative paths survive a change to the folder’s outer location because their internal starting point and destination remain in the same relationship.
When reorganizing folders inside the diary, recalculate links for affected notes. For instance, moving a note from Diary/2026/ to Diary/2026/trips/ changes the path it needs to reach Diary/images/: it now requires ../../images/blue-mug.jpg. A relative link handles relocation of the whole tree, but it cannot automatically compensate for rearranging only one part of that tree.
Test a real move in the viewer you use
Use a small, reversible check before relying on a new folder arrangement:
Pick a note with at least one local image and confirm the image currently displays in your normal Markdown viewer.
Copy the complete diary folder to a different location, such as another ordinary folder or a removable drive. Preserve all subfolders and filenames.
Open the copied note from its new location in the same viewer. Confirm that the image appears, not merely that the Markdown source contains the expected text.
Open one or two images in notes at different depths, especially any note using ../. This checks more than a single same-folder example.
If an image is missing, compare the destination with the actual folder tree: check the starting note folder, each ../, every subfolder name, filename spelling, extension, and capitalization. Correct the path, then repeat the check on the moved copy.
This is a practical test, not a universal guarantee across apps. Standard Markdown describes image syntax, but viewers can add their own conventions. For example, Obsidian documents both Markdown image syntax and its own embed syntax (![[image.jpg]]), and its settings separately describe relative, vault-root, and shortest-path link formats. If your diary is opened in a vault-based app, check whether you are using standard Markdown destinations or app-specific embeds and link settings. Obsidian Help: Embed files Obsidian Help: Settings
Diagnose a broken image after the move
If the image disappears, first establish which copy of the note the viewer opened. It is easy to inspect the original note and assume the moved one is being shown. Then follow the relative path manually from that note’s directory and confirm the named image exists at the destination.
A quick way to narrow the fault is to temporarily compare the path with the folder tree: if 2026-09-30.md is in Diary/2026/, ../images/blue-mug.jpg should resolve to Diary/images/blue-mug.jpg. If the path reaches the intended folder but the file is named Blue-Mug.JPG, update either the filename reference or the file name so they match exactly. If the image opens in a file browser but does not render in the note, the remaining issue may be how that viewer handles local Markdown paths; verify with its documentation or test a plain Markdown image destination.
A simple portability rule
Keep local diary images under the diary’s top-level folder, write each image path relative to the note that displays it, and preserve the folder structure when moving the diary. Finally, open the moved copy in the actual viewer and confirm representative images display. That routine checks the file relationship and the app’s behavior together, which is what makes a portable setup dependable in everyday use.
