Components media

Image

Component for displaying photos, illustrations, or graphics with configurable sizing and fit behavior.

Updated Mar 6, 2026

Image

Component for displaying photos, illustrations, or graphics with configurable sizing and fit behavior.

Use Cases

  • Product photos
  • Team member headshots
  • Logos and branding
  • Illustrations and graphics
  • Photo galleries

Properties

src

Image URL - can be external URL or data URL from generate_image tool. Type: string. Recommendations: generated – Use generate_image tool for AI-generated images (returns base64 data URL); external – Use HTTPS URLs for external images.

alt

Alternative text for accessibility - describes image content. Type: string.

width

Image width (CSS value). Type: string.

height

Image height (CSS value). Set a fixed height (e.g. '300px') or use with aspectRatio for constrained sizing. Type: string.

aspectRatio

Constrains image to a specific aspect ratio. Required for 'fit' to have a visible effect when height is 'auto'. Type: string. Options: auto, 1 / 1, 4 / 3, 3 / 2, 16 / 9, 21 / 9. Default: auto. Visual Impact: auto – Image uses its natural aspect ratio (default); 1 / 1 – Square image; 4 / 3 – Traditional photo ratio; 3 / 2 – Standard camera ratio; 16 / 9 – Widescreen ratio (best for hero‑like images); 21 / 9 – Ultra‑wide cinematic ratio. Recommendations: photos – Use '16 / 9' or '3 / 2' for landscape photos; headshots – Use '1 / 1' for profile photos and avatars; product – Use '4 / 3' for product images.

fit

How image should fit within dimensions. Type: string. Options: cover, contain, fill. Default: cover. Visual Impact: cover – Image covers entire area, may crop edges to maintain aspect ratio (best for photos); contain – Image fits completely within area, may have empty space (best for logos); fill – Image stretched to fill area, may distort (rarely used). Recommendations: photos – Use 'cover' for photos that should fill space; logos – Use 'contain' for logos or images that must show completely; avoid-fill – Avoid 'fill' – causes distortion.

Best Practices

  • CRITICAL: For Hero backgrounds, use generate_image tool and place image in Hero component
  • Always set alt text for accessibility
  • Set aspectRatio (e.g. '16 / 9') or explicit height for fit property to work — fit has no effect with height: 'auto' and aspectRatio: 'auto'
  • Use fit: 'cover' for photos that should fill space without distortion
  • Use fit: 'contain' for logos or images that must show completely
  • Prefer Hero component with generate_image for hero sections over standalone Image

Common Mistakes

Not setting alt text

Why it's a problem: Violates accessibility standards - screen readers can't describe image to visually impaired users

Fix: Always set alt with descriptive text explaining image content

Using Image for hero sections instead of Hero component

Why it's a problem: Hero component provides better layout with text overlay, CTA buttons, and responsive design

Fix: Use Hero component with generate_image for hero sections, not standalone Image

Using fit: 'fill' which distorts images

Why it's a problem: Stretches image to fit dimensions - causes distortion and looks unprofessional

Fix: Use fit: 'cover' for photos (crops edges) or 'contain' for logos (shows completely)

Tags

image media product photos team member logos and

Related Components

Ready to build?

Start creating your app for free with Qödiak.

Get Started Free

Related Articles

AnimatedGradient

Smooth animated gradient background for modern, premium aesthetics. Supports linear and radial gradients with configurable colors, animation speed, and intensity. GPU‑accelerated for smooth 60fps performance.

Button

Interactive button component that supports link navigation, page data source operations (record navigation, new record, mode switching), form submission, and custom JavaScript execution. Save/Delete actions must use a custom‑script with navigation. Two visual variants are available, and the button can be enabled or disabled dynamically based on data context.

Calendar

A full‑featured calendar component built with react‑big‑calendar. It can display events in month, week, day, or agenda views and includes navigation and view‑switching capabilities, making it suitable for any site that needs scheduling, event management, or date visualization.

Card

Feature card component with an icon, title, description, and entrance animations. Ideal for showcasing features, services, or benefits in grid layouts with animation support.

Checkbox

A checkbox group component that lets users select multiple options from a predefined list. It renders a set of checkboxes with individual labels and can be arranged vertically or horizontally.

CountdownTimer

Real-time countdown timer component that displays the time remaining until a target date/time. It updates every second, offers customizable formatting, and shows a completion message when the countdown ends. Suitable for any site type.