Update version to 1.0.0 across package.json and changelog. Configure netlify.toml with Convex deployment URL (agreeable-trout-200.convex.site). Verify TypeScript type-safety for src and convex directories. Confirm Netlify build passes with SPA 404 fallback configured. Update TASK.md with deployment steps and files.md with complete file structure.
2.8 KiB
title, description, date, slug, published, tags, readTime, image
| title | description | date | slug | published | tags | readTime | image | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Using Images in Blog Posts | Learn how to add header images, inline images, and Open Graph images to your markdown blog posts. | 2025-01-18 | using-images-in-posts | true |
|
4 min read | https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=1200&h=630&fit=crop |
Using Images in Blog Posts
This post demonstrates how to add images to your blog posts. You can use header images for social sharing, inline images for content, and set Open Graph images for better link previews.
Header/Open Graph Images
The image field in your frontmatter sets the Open Graph image for social media previews. When someone shares your post on Twitter, LinkedIn, or Slack, this image appears in the preview card.
---
title: "Your Post Title"
image: "https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=1200&h=630&fit=crop"
---
Recommended dimensions: 1200x630 pixels (1.91:1 ratio)
Inline Images
Add images anywhere in your markdown content using standard syntax:

Here's an example image from Unsplash:
The alt text appears as a caption below the image.
Image Sources
You can use images from:
| Source | Example |
|---|---|
| Local files | /images/my-image.png |
| Unsplash | https://images.unsplash.com/... |
| Cloudinary | https://res.cloudinary.com/... |
| Any CDN | Full URL to image |
Local Images
Place image files in the public/images/ directory:
public/
images/
screenshot.png
diagram.svg
photo.jpg
Reference them with a leading slash:

External Images
Use the full URL for images hosted elsewhere:

Here's a coding-themed image:
Best Practices
- Use descriptive alt text for accessibility
- Optimize image size before uploading (compress PNG/JPG)
- Use CDN URLs for external images when possible
- Match OG image dimensions to 1200x630 for social previews
- Use SVG for logos and icons
Free Image Resources
These sites offer free, high-quality images: