DEV Community

AIGCer
AIGCer

Posted on

How to Write Better Prompts for AI Image Generators (With Examples)

AI image generators have become remarkably capable, but the quality of what you get still depends heavily on what you ask for. A vague prompt like "a cat" produces a generic result; a well-structured prompt produces something you can actually use. Here is a practical framework for writing better prompts, with examples you can adapt.

1. Start With a Clear Subject

The subject is the anchor of your image. Be specific about who or what it is, what it is doing, and any defining details.

  • Weak: a dog
  • Better: a golden retriever puppy sitting on a wooden porch, holding a red ball in its mouth

Specific nouns and actions reduce guesswork. If there are multiple subjects, describe their relationship ("a barista handing a coffee cup to a customer").

2. Define the Style

Style tells the model how the image should look. You can reference a medium, an art movement, or a visual genre.

  • watercolor illustration
  • 35mm film photograph
  • flat vector icon, minimal
  • isometric 3D render

Combining one medium with one mood ("cozy watercolor illustration") usually works better than stacking five styles that contradict each other.

3. Describe the Lighting

Lighting is the fastest way to change the mood of an image, and it is often forgotten.

  • soft morning light through a window
  • dramatic rim lighting, dark background
  • golden hour, long shadows
  • overcast, diffused light

Example: portrait of an elderly fisherman, weathered face, golden hour side lighting, shallow depth of field.

4. Control the Composition

Composition covers framing, camera angle, and layout. Think like a photographer:

  • Shot type: close-up, wide shot, bird's-eye view
  • Lens hints: 85mm portrait lens, wide-angle
  • Placement: subject on the left third, empty space on the right for text
  • Aspect ratio: square for social posts, 16:9 for banners

If you need room for a headline, say so explicitly.

5. Use Negative Cues

Many tools let you specify what you don't want, either through a negative prompt field or with phrases like "without" or "no".

  • no text, no watermark
  • without extra fingers, no distorted hands
  • no people in the background

Keep negatives short and targeted. A long list of exclusions can confuse the model more than it helps.

6. Iterate Deliberately

Your first result is a draft, not a final answer. Change one variable at a time so you learn what actually made the difference:

  1. Generate with your base prompt.
  2. Adjust lighting only; compare.
  3. Adjust composition only; compare.
  4. Save the prompts that work as reusable templates.

A simple template looks like this:

[subject + action], [style], [lighting], [composition], [details]. Negative: [exclusions]
Enter fullscreen mode Exit fullscreen mode

Putting It Together

Here is a full example:

A ceramic coffee mug on a marble kitchen counter, steam rising, product photography style, soft natural window light from the left, close-up at eye level, subject centered with negative space above. Negative: no text, no logos, no clutter.

You can try prompts like this with an AI image generator online and compare how different models interpret the same wording. Newer models such as Nano Banana 2 tend to follow detailed lighting and composition instructions closely, which makes structured prompts even more valuable.

Final Tips

  • Lead with the most important element.
  • Prefer concrete words over abstract adjectives like "beautiful".
  • Keep a prompt journal of what worked.

Good prompting is less about magic keywords and more about clear communication. Describe the image you see in your head as precisely as you would to a human designer, and the results will follow.

Top comments (0)