Image gallery

From thedaviddias/ux-patterns-for-developers · View interactive version

Image gallery is an AI agent skill from the GitHub repository thedaviddias/ux-patterns-for-developers. Use when you need to display and browse image collections.

How to use this skill

Skill file

Image Gallery

Display and browse image collections

What it solves

A Image Gallery pattern helps teams create a reliable way to help users browse several related images without losing orientation, context, or performance. It is most useful when teams need portfolio and gallery pages.

Compared with adjacent patterns, this pattern should reduce friction without hiding the state, rules, or recovery paths people need to keep moving.

When to use

When to avoid

Implementation workflow

  1. Confirm the pattern matches the problem and constraints before copying the example.
  2. Start from the anatomy and examples in references/pattern.md, then choose the smallest viable variation.
  3. Apply accessibility, performance, and interaction guardrails before layering visual polish.
  4. Use the testing guidance to verify behavior across keyboard, screen reader, responsive, and failure scenarios.

Accessibility guardrails

Keyboard Interaction

Screen Reader Support

Visual Accessibility

Common mistakes

**Treating media as decoration only**

The Problem:

Important uploads and playback flows break when the design assumes the media is just visual garnish.

How to Fix It?

Design state, metadata, and controls as first-class parts of the pattern, not as overlays added later.

**Skipping fallback behavior**

The Problem:

Different devices support different codecs, capture flows, and bandwidth envelopes.

How to Fix It?

Plan graceful fallbacks for unsupported APIs, low data conditions, and failed loads.

**Forgetting accessibility artifacts**

The Problem:

Media patterns become exclusionary quickly when captions, transcripts, alt text, or visible status are missing.

How to Fix It?

Treat alternate access paths as part of the core experience, not as post-launch polish.

Related patterns


For full implementation detail, examples, and testing notes, see references/pattern.md.

Pattern page: https://uxpatterns.dev/patterns/media/image-gallery

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.