Markdown Images

Images make your content more engaging and help illustrate your points. Markdown provides simple syntax for adding images, though you'll sometimes need HTML for more advanced features.

Basic Image Syntax

The basic syntax for images in Markdown is similar to links, but with an exclamation mark at the beginning:

![Alt text](image-url.jpg)
![Local image](./images/photo.jpg)
![External image](https://example.com/image.jpg)

Images with Titles

You can add titles that appear when users hover over the image:

![Alt text](image.jpg "Image title")

Alt Text Best Practices

Alt text is crucial for accessibility and SEO:

1. Be Descriptive

❌ Not helpful:

![Image](photo.jpg)
![Picture](pic.png)

✅ Descriptive:

![Woman coding at a laptop in a coffee shop](coding-coffee.jpg)
![Bar chart showing sales increase from 2020 to 2024](sales-chart.png)

2. Keep It Concise

❌ Too long:

![This is a really long description of an image that shows a person sitting at a computer in what appears to be a modern office environment with white walls and large windows](office.jpg)

✅ Concise:

![Person working at computer in modern office](office.jpg)

3. Don't Include "Image of" or "Picture of"

❌ Redundant:

![Image of a dog playing in the park](dog.jpg)

✅ Direct:

![Dog playing in the park](dog.jpg)

Reference-Style Images

Like links, you can use reference-style syntax for images:

![Alt text][image-reference]  

[image-reference]: image.jpg "Optional title"

Example

Here's our logo: ![Company Logo][logo]

And here's a screenshot: ![App Screenshot][screenshot]

[logo]: /images/logo.png "My Company Logo"
[screenshot]: /images/app.png "App Dashboard Screenshot"

Image Paths and URLs

Local Images

![Local image](./images/photo.jpg)
![Relative path](../assets/icon.png)
![Absolute path](/public/images/banner.jpg)

External Images

![External image](https://example.com/image.jpg)
![Unsplash photo](https://images.unsplash.com/photo-123/photo.jpg)

Common Patterns

Image with Caption

![Team meeting in conference room](meeting.jpg)
*Figure 1: Weekly team meeting discussing project milestones*

Before/After Images

## Before
![Old website design](old-design.png)

## After
![New website design](new-design.png)

Step-by-Step Instructions

1. Click the settings icon
![Settings icon in top right corner](settings-icon.png)

2. Select "Account Settings"
![Account settings menu option](account-menu.png)

3. Update your profile information
![Profile form with editable fields](profile-form.png)

Image Gallery

## Project Screenshots

![Homepage](homepage.png) ![Dashboard](dashboard.png) ![Settings](settings.png)

Troubleshooting Images

Common Issues

  1. Image not displaying: Check file path and filename
  2. Broken image icon: Verify image URL is accessible
  3. Image too large: Resize or compress the image
  4. Wrong format: Ensure browser supports the image format

Testing Images

  • Preview in your Markdown editor
  • Check in different browsers
  • Verify on mobile devices
  • Test with slow internet connections

Advanced Techniques

Image Links

Combine images with links:

[![Click to view larger](thumbnail.jpg)](full-size.jpg)

Images are a powerful way to enhance your Markdown documents. Use them thoughtfully to support your content and improve user experience!

Need to emphasize text in your content? Learn about strikethrough formatting next.