Complete Guide: Images, Tables & Diagrams in Blog Posts
Learn how to add images, architecture diagrams, tables, and rich media to your blog posts

Complete Guide: Images, Tables & Diagrams
This post demonstrates how to add various media types to your blog posts.
πΈ Adding Images
1. Regular Images
First, save your image in /public/images/ folder, then reference it:
1
Example:

2. Images with Links
You can make images clickable:
1[](https://example.com)
3. Image Best Practices
Pro Tip: Use descriptive filenames like kubernetes-architecture.png
instead of image1.png
- Save images in
/public/images/ - Use
.pngfor diagrams/screenshots - Use
.jpgfor photos - Optimize images before uploading (use tools like TinyPNG)
- Use descriptive alt text for accessibility
π Tables
Tables are easy with Markdown syntax:
| Feature | Status | Priority | | -------------- | -------------- | -------- | | Authentication | β Complete | High | | API Gateway | π§ In Progress | High | | Monitoring | β Not Started | Medium | | Documentation | β Complete | Low |
Complex Table Example
| Service | Before | After | Savings | Notes | | --------- | --------- | --------- | ------- | --------------------- | | EC2 | $280K | $70K | 75% | Right-sized instances | | RDS | $120K | $50K | 58% | Consolidated replicas | | S3 | $20K | $12K | 40% | Lifecycle policies | | Total | $420K | $132K | 69% | Annual savings |
Tables automatically format nicely with your blog's styling!
ποΈ Architecture Diagrams
Option 1: Image Files
Create diagrams in tools like:
- Excalidraw (https://excalidraw.com)
- Draw.io (https://draw.io)
- Lucidchart
- Figma
Then export as PNG/SVG and add to /public/images/:
1
Option 2: ASCII Diagrams
βββββββββββββββ
β Client β
ββββββββ¬βββββββ
β
βΌ
βββββββββββββββ βββββββββββββββ
β API GatewayββββββΆβ Backend β
βββββββββββββββ ββββββββ¬βββββββ
β
βΌ
βββββββββββββββ
β Database β
βββββββββββββββ
Option 3: Mermaid Diagrams (Future Enhancement)
1graph TD 2 A[Client] --> B[Load Balancer] 3 B --> C[Web Server 1] 4 B --> D[Web Server 2] 5 C --> E[Database] 6 D --> E[Database]
π Code with Comments
You can add inline comments in code blocks:
1apiVersion: v1 2kind: Service 3metadata: 4 name: my-app 5 labels: 6 app: my-app 7spec: 8 type: LoadBalancer # Exposes service externally 9 ports: 10 - port: 80 11 targetPort: 8080 # Container port 12 selector: 13 app: my-app # Matches pods with this label
π Lists with Images
-
Step 1: Create your image

-
Step 2: Upload to
/public/images/ -
Step 3: Reference in markdown
π‘ Callouts with Different Types
Information: Use this for helpful tips and additional context.
Warning: Important things to watch out for!
Danger: Critical security issues or breaking changes!
Success: Best practices and recommended approaches!
π― Complete Workflow
Step-by-Step: Adding an Image
-
Create/Get your image
- Screenshot
- Diagram from Excalidraw
- Photo
-
Save to project
1# Save image to this folder: 2/public/images/my-diagram.png -
Reference in your blog post
1 -
That's it!
- Save the MDX file
- Refresh browser
- Image appears in your blog
π¦ File Organization
blog_website/
βββ content/posts/
β βββ my-post.mdx # Your blog post
βββ public/
β βββ images/
β βββ kubernetes.png # Your images here
β βββ architecture.png
β βββ screenshot.jpg
πΌοΈ Image in Different Sections
Hero Image (Top of post)
Set in front-matter:
1--- 2coverImage: "/images/hero.svg" 3---
Inline Images
Add anywhere in content:
1
Side-by-Side Images
1<div style="display: flex; gap: 1rem;"> 2 3 4 5 6</div>
β Quick Reference
| Element | Syntax |
| ------- | ------------------------------------- |
| Image |  |
| Table | \| Col1 \| Col2 \| |
| Callout | <Callout type="info">Text</Callout> |
| Code | ```language |
| Heading | ## Heading |
| Bold | **text** |
| Italic | *text* |
| Link | [text](url) |
That's all you need to know! Now you can create rich, visually appealing blog posts with images, diagrams, and tables. π