Images Directory Organization
Images Directory Organization
This directory contains all images used across the website.
Directory Structure
images/
βββ posts/ # Blog post images
β βββ YYYY-MM-title/ # Organize by post
βββ pub-crawl/ # Pub crawl event images
βββ profile images # Profile photos, bio images
βββ other categories as needed
Guidelines
Naming Conventions
- Be descriptive:
pheidippides-marathon.pngnotimage1.png - Use lowercase:
my-image.jpgnotMy-Image.jpg - Use hyphens:
my-image.pngnotmy_image.pngormyimage.png - No spaces: Never use spaces in filenames
File Organization
For blog posts: Create a subdirectory for each post with multiple images:
images/posts/2026-01-modeling-predictions/
βββ figure-1-model-comparison.png
βββ figure-2-results.png
βββ dataset-overview.jpg
For posts with just one or two images, you can place them directly in images/posts/:
images/posts/
βββ 2026-01-quick-note-diagram.png
βββ 2026-02-simple-plot.jpg
For personal content:
images/pub-crawl/
βββ 2022-pheidippides.png
βββ 2022-mike-rest.jpeg
βββ 2023-west-general-wolfe.png
βββ 2026-desert-storm.png
File Formats
- Photos: Use
.jpgor.jpeg- Best for photographs and images with many colors
- Smaller file sizes with acceptable quality loss
- Graphics/Diagrams: Use
.png- Best for diagrams, screenshots, text
- Lossless compression, crisp edges
- Avoid:
.heic- Not universally supported in browsers.bmp- Unnecessarily large file sizes.gif- Only if you need animation
Image Optimization
Always optimize images before adding them to the repository:
Using ImageMagick (command line):
# Resize to max width of 1200px
convert input.jpg -resize 1200x output.jpg
# Compress JPEG
convert input.jpg -quality 85 output.jpg
# Convert HEIC to JPEG
convert input.heic output.jpg
Using macOS Preview:
- Open image in Preview
- Tools β Adjust Size
- Set max dimension to 1200-1600px
- Export with quality ~85%
Online tools:
Adding Images to Posts
In your markdown files, reference images using absolute paths:

Always include:
- Descriptive alt text for accessibility
- Caption if needed (use italics below the image)
Example with caption:

*Merson's "Pheidippides Giving Word of Victory After the Battle of Marathon," 1869*
Quick Add Script
You can create a helper script add-image.sh:
#!/bin/bash
# Usage: ./add-image.sh /path/to/image.jpg posts/my-post/
SOURCE=$1
DEST_DIR="images/$2"
mkdir -p "$DEST_DIR"
# Get filename
FILENAME=$(basename "$SOURCE")
# Copy and optimize
cp "$SOURCE" "$DEST_DIR/$FILENAME"
echo "Image added to $DEST_DIR/$FILENAME"
echo "Markdown: "
Image Size Guidelines
- Max width: 1600px (for high-DPI displays)
- Typical width: 800-1200px
- Thumbnails: 300-400px
- File size: Aim for <500KB per image, <200KB ideal
Accessibility
Always include descriptive alt text:
- Good:
 - Bad:

Alt text should:
- Describe the content and function of the image
- Be concise (1-2 sentences)
- Omit βimage ofβ or βpicture ofβ (screen readers already announce itβs an image)
For more information, see the main BLOG_GUIDE.md.
