Adding Images to Documentation
This guide explains how to add images and screenshots to NetPad documentation.
Image Locationsโ
Site-Wide Imagesโ
Place images in /static/img/ for site-wide use:
static/
img/
docs/ # Documentation-specific images
forms/ # Form-related screenshots
workflows/ # Workflow screenshots
data-explorer/ # Data explorer screenshots
platform/ # Platform screenshots
logo.png # Site logos
favicon.ico # Favicon
Page-Specific Imagesโ
You can also place images next to markdown files:
docs/
forms/
building-forms.md
images/
form-builder.png
field-palette.png
Adding Images to Markdownโ
Basic Image Syntaxโ

With Title/Captionโ

Using HTML for More Controlโ
<img
src="/img/docs/forms/form-builder.png"
alt="Form Builder Interface"
width="800"
style={{maxWidth: '100%', height: 'auto'}}
/>
Centered Imagesโ
<div style={{textAlign: 'center'}}>
<img
src="/img/docs/forms/form-builder.png"
alt="Form Builder Interface"
width="800"
/>
<p><em>Form Builder Interface</em></p>
</div>
Image Best Practicesโ
File Namingโ
- Use descriptive names:
form-builder-interface.png - Use kebab-case:
field-types-overview.png - Include context:
workflow-editor-canvas.png
Image Formatsโ
- PNG: For screenshots, diagrams with text
- JPG/JPEG: For photos (rarely needed)
- SVG: For icons, simple diagrams
- GIF: For animated demonstrations (use sparingly)
Image Sizesโ
- Screenshots: 1200-1600px width (retina-ready)
- Diagrams: 800-1200px width
- Icons: 64-128px
- Optimize: Compress images before adding
Alt Textโ
Always include descriptive alt text:
- โ
Good:
![Form Builder with field palette open] - โ Bad:
![image]or![screenshot]
Organizing Imagesโ
By Featureโ
Organize images by feature area:
static/img/docs/
forms/
form-builder.png
field-types.png
validation-rules.png
workflows/
workflow-editor.png
node-types.png
execution-monitor.png
data-explorer/
collection-browser.png
document-viewer.png
By Documentโ
Group images with their documents:
docs/
forms/
building-forms.md
building-forms/
images/
step1-connect-mongodb.png
step2-add-fields.png
step3-publish.png
Examplesโ
Screenshot with Captionโ
<div style={{textAlign: 'center'}}>
<img
src="/img/docs/forms/form-builder.png"
alt="NetPad Form Builder showing the visual form editor with field palette"
width="1000"
/>
<p><em>The Form Builder interface with field palette and canvas</em></p>
</div>
Inline Imageโ
When you click the "Add Field" button, you'll see the field palette:

Select a field type to add it to your form.
Side-by-Side Comparisonโ
<div style={{display: 'flex', gap: '20px', margin: '20px 0'}}>
<div style={{flex: 1}}>
<img
src="/img/docs/forms/table-view.png"
alt="Table view of form submissions"
width="100%"
/>
<p><em>Table View</em></p>
</div>
<div style={{flex: 1}}>
<img
src="/img/docs/forms/card-view.png"
alt="Card view of form submissions"
width="100%"
/>
<p><em>Card View</em></p>
</div>
</div>
Annotated Screenshotโ
For complex screenshots, consider:
- Adding numbered annotations in the image
- Using a tool like Annotely or Markup
- Creating a labeled version

1. Field Palette - Drag fields from here
2. Form Canvas - Drop fields here
3. Properties Panel - Configure selected field
4. Preview Button - Test your form
Tools for Creating Screenshotsโ
Screenshot Toolsโ
- macOS: Cmd+Shift+4 (select area), Cmd+Shift+3 (full screen)
- Windows: Snipping Tool, Windows+Shift+S
- Linux: Flameshot, Shutter
- Cross-platform: ShareX, Lightshot
Image Editingโ
- Crop/Resize: Preview (macOS), GIMP, ImageMagick
- Annotate: Annotely, Markup, Skitch
- Optimize: ImageOptim, TinyPNG, Squoosh
Creating Diagramsโ
- Mermaid: Built into Docusaurus (see below)
- Draw.io: Free diagram tool
- Excalidraw: Hand-drawn style diagrams
- Figma: Professional design tool
Using Mermaid Diagramsโ
Docusaurus supports Mermaid diagrams natively:
```mermaid
graph TD
A[Form Submission] --> B{Validation}
B -->|Valid| C[Save to MongoDB]
B -->|Invalid| D[Show Errors]
C --> E[Trigger Workflow]
E --> F[Send Email]
```
Image Optimizationโ
Before Addingโ
- Resize: Resize to appropriate dimensions
- Compress: Use tools like ImageOptim or TinyPNG
- Format: Use PNG for screenshots, SVG for diagrams
- Test: Verify image looks good at different sizes
Compression Toolsโ
- ImageOptim (macOS): Drag and drop
- TinyPNG: Web-based, preserves transparency
- Squoosh: Google's compression tool
- ImageMagick: Command-line tool
# Example: Resize and optimize with ImageMagick
convert screenshot.png -resize 1200x -quality 85 optimized.png
Accessibilityโ
Alt Text Guidelinesโ
- Descriptive: Describe what's in the image
- Contextual: Include relevant context
- Concise: Keep it brief but informative
- Avoid: "Image of", "Screenshot of" (redundant)
Examples:
- โ
![Form builder with three fields: name, email, and message] - โ
![Workflow canvas showing form trigger connected to email node] - โ
![Screenshot] - โ
![Image]
Decorative Imagesโ
For decorative images, use empty alt text:

Version Controlโ
Git LFS (Large File Storage)โ
For large images, consider Git LFS:
git lfs install
git lfs track "*.png"
git lfs track "*.jpg"
Image Sizesโ
- Small images (< 100KB): Commit directly
- Large images (> 100KB): Consider Git LFS or external hosting
Common Use Casesโ
Step-by-Step Tutorialsโ
## Step 1: Create Form

## Step 2: Add Fields

Feature Demonstrationsโ
### Conditional Logic
NetPad supports powerful conditional logic:

Configure rules to show or hide fields based on user responses.
UI Component Documentationโ
### Field Properties Panel
The properties panel appears when you select a field:

Configure field name, validation rules, and conditional logic.
Quick Referenceโ
Markdown Syntaxโ

HTML Syntaxโ
<img src="/img/docs/path/to/image.png" alt="Alt text" width="800" />
Pathsโ
- Absolute (from site root):
/img/docs/forms/form-builder.png - Relative (from markdown file):
./images/form-builder.png(if in same directory)
Next Stepsโ
- Take screenshots of key features
- Organize them in
/static/img/docs/ - Add images to relevant documentation pages
- Optimize images for web
- Add descriptive alt text