2 min read

Working with Images in Your Blog Posts

A guide to adding and formatting images in your markdown blog posts, including local and external images.

Working with Images in Your Blog Posts

Working with Images in Your Blog Posts

This post demonstrates how to add images to your markdown blog posts. You can include images from various sources and they'll be displayed beautifully in your blog.

External Images from URLs

You can embed images directly from external URLs. Here's an example using an Unsplash image:

A beautiful landscape from Unsplash

Different Image Sizes

Full Width Image

Full width mountain view

Medium Size Image

Coffee and notebook

Small Inline Image

Here's a smaller image that can be used inline with text:

- perfect for adding visual interest to your paragraphs.

Images with Alt Text

Always include descriptive alt text for accessibility:

Developer working on a laptop with multiple screens showing code

Multiple Images in a Row

You can place multiple images to create a gallery effect:

Best Practices for Blog Images

  1. Use descriptive alt text - This helps with SEO and accessibility
  2. Optimize image sizes - Use appropriate dimensions for your content
  3. Choose relevant images - Images should enhance your content, not distract from it
  4. Consider loading performance - Use lazy loading for better page speed
  5. Maintain consistency - Use similar styles and quality across your posts

Technical Implementation

In this blog, images are automatically:

  • Centered in the content area
  • Given rounded corners for a modern look
  • Styled with a subtle shadow for depth
  • Made responsive to fit different screen sizes
  • Lazy loaded for better performance

Using Local Images

You can also use local images by placing them in the public folder:

![Local image](/images/my-image.jpg)

Conclusion

Adding images to your blog posts is simple with markdown. Just use the standard markdown image syntax, and the blog will handle the rest - making your images look great on all devices!

Small Bites Newsletter

새 글이 발행되면 이메일로 보내드려요.

언제든지 구독 취소 가능