Complete the lesson quiz and earn 250 XP.
Digital imagery in user interfaces is bifurcated into two distinct mathematical architectures:
Constructed from a fixed grid of colored pixels.
Constructed from mathematical paths, curves, points, and geometric primitives.
Selecting the correct container format controls web performance and Largest Contentful Paint (LCP):
An aspect ratio describes the proportional relationship between an image's width and height ($W:H$):
On mobile screens, wide 16:9 images shrink vertically, rendering human faces or key details illegible. Modern UI employs CSS object-position and art-directed crops to zoom into the subject's focal point on narrow screens.
In 2010, the introduction of high-density displays (such as Apple's Retina) separated CSS pixels from physical device pixels:
If an engineer serves a 100x100px raster image on a 2x display, the hardware scales it across 200x200 physical pixels, making the image look fuzzy. To maintain crispness, designers must export raster assets at 2x and 3x dimensions.
Extensive eye-tracking studies by Nielsen Norman Group reveal profound user behavioral differences based on image authenticity:
Authentic imagery builds credibility; decorative stock imagery adds cognitive noise and erodes trust.
Every image in a web application must be categorized for assistive technology under WCAG 1.1.1:
Images that convey conceptual information, instruction, or data (e.g., an infographic or a photo demonstrating how to wear a headset).
alt text explaining the content and functional purpose to screen reader users.Images used purely for visual styling, emotional ambience, or redundant decoration (e.g., a background flourish).
alt="") or aria-hidden="true" so screen readers ignore them rather than reading irrelevant filenames.