Write Perfect Alt Text for Your Images Using AI 🖼️
Hi, Ben here.
So you've written a great article and found the perfect photo to go with it. You're ready to publish, but there's one small, important step left: writing the "alt text" for your image.
What is alt text? It's a short, written description of an image. It's crucial for two reasons:
- Accessibility: It's what screen readers use to describe the image to visually impaired readers.
- SEO: It tells Google what your image is about, which can help your article rank better in search results.
Writing good alt text can be a bit of a pain, but you can use AI to do it for you instantly.
What You'll Need
- Tool: Google Gemini (It can "see" images, which is perfect for this)
- Your Image: The photo you want to use.
- Time: 2 minutes
- Difficulty: Easy
Step 1: Upload Your Image to Gemini
First, we need to show the AI the image we're working with.
- Go to the Google Gemini website.
- In the chat box, you'll see a small icon that looks like a picture of a mountain. Click it to upload an image.
- Select the photo from your computer that you want to write alt text for.
Step 2: Copy the "Magic" Prompt
This prompt tells the AI exactly what we need. It asks for a descriptive, concise alt text that is useful for both accessibility and SEO.
Copy this entire block of text:
Act as an accessibility and SEO expert.
Based on the image I've uploaded, please write a clear and descriptive alt text for it. The description should be concise (under 125 characters) and accurately describe what is happening in the photo.
Step 3: Use the Prompt in Gemini
- After you've uploaded your image, the prompt box will be ready for you to type in.
- Paste the "Magic" Prompt into the chat box.
- Hit Enter.
Step 4: Get Your Perfect Alt Text
The AI will analyze the photo and write a perfect, descriptive alt text for you. For the photo we generated in our last recipe, it would produce something like this:
AI's Alt Text:
A man with short brown hair sits at a messy home office desk at night, looking thoughtfully at his laptop screen.
That's it! It's clear, descriptive, and perfectly explains the image. You can now copy this and paste it into the alt text field for the image in your Ghost post.
Why This Works
This process is effective because we're using a specific feature of modern AI models: multimodality. That's just a fancy way of saying the AI can understand more than just text.
- By uploading the image directly, we're not asking the AI to guess what's in it. It can "see" the image and describe the actual visual elements.
- By asking it to act as an "accessibility and SEO expert", we're priming it to focus on creating text that is not just descriptive, but also useful for screen readers and search engines.
Alternative Tools for This Recipe
- ChatGPT: The paid version (GPT-4) also allows you to upload images and is excellent at describing them.
- Microsoft Copilot: Also has image recognition capabilities and can perform this task well.