Responsive Images
Project workbook · Path 93

Create a responsive image example with truthful alternative text, explicit dimensions and a documented source-selection test.

The case

A fictional tutorial card displays a diagram at up to 700 CSS pixels. The package provides raster candidates 350, 700 and 1,400 pixels wide with the same 7:4 aspect ratio. The browser selects a candidate using layout, pixel density and its own conditions; exact selection is not guaranteed by markup alone.

Candidate widthHeightAspect ratio
3502007:4
7004007:4
14008007:4
STAGE 1

Understand image representation

A precise diagram can remain vector-based, while raster variants are useful for testing responsive markup. Preserve the same content across variants so size selection does not change meaning. The case uses an original educational diagram rather than decorative stock photography. File dimensions and byte size answer different questions.

Your task

Inspect the SVG and the three raster candidates.

Required output

Asset inventory

Record your result and evidence here or in a separate file.

Review gate

Each variant has the stated ratio and the same diagram content.

If the gate is not met

Compare dimensions rather than assuming a filename is accurate.

STAGE 2

Describe the source choices

Use width descriptors in srcset and a sizes value that reflects the actual CSS layout. The browser uses those hints rather than a simple device-name rule. A misleading sizes value can cause an unnecessarily large download. Keep a normal src fallback and a meaningful alt description.

Your task

Build the responsive image element for a 700-pixel maximum layout.

Required output

Responsive markup

Record your result and evidence here or in a separate file.

Review gate

Descriptors match actual raster widths and sizes agrees with the CSS.

If the gate is not met

Measure the rendered slot before editing the candidate list.

STAGE 3

Reserve space and preserve meaning

Explicit dimensions establish the intrinsic ratio so the page can reserve space before the image loads. Alternative text should convey the diagram’s relevant relationship, while nearby text can provide detail. Do not duplicate a long caption word for word if it makes the reading experience repetitive.

Your task

Add dimensions, alt text and a concise text equivalent.

Required output

Accessible image block

Record your result and evidence here or in a separate file.

Review gate

The information remains understandable with the image unavailable.

If the gate is not met

Describe the relationship shown, not merely a colorful diagram.

STAGE 4

Distinguish art direction

The picture element can select different compositions when the visual information must be framed differently. That is distinct from offering the same image at multiple resolutions. This case uses resolution switching, so extra art-direction markup is unnecessary unless a meaningful small-screen composition is created.

Your task

Explain whether the case needs picture or a single img with srcset.

Required output

Markup rationale

Record your result and evidence here or in a separate file.

Review gate

The rationale separates composition changes from resolution changes.

If the gate is not met

Use the simpler structure when every candidate has identical content.

STAGE 5

Inspect actual browser behavior

Test at two viewports and inspect currentSrc, rendered width and image dimensions. Cache and device scale can affect selection, so record conditions and avoid asserting a universal candidate. The prepared files can be checked locally; production CDN behavior would need separate verification after deployment.

Your task

Record candidate selection and layout at desktop and mobile widths.

Required output

Image test log

Record your result and evidence here or in a separate file.

Review gate

Actual currentSrc values are recorded, not guessed from viewport alone.

If the gate is not met

Clear or account for cache when comparing requests.

Final project

Deliver the source diagram, three raster candidates, responsive HTML and two-viewport inspection log. Show that removing the image still leaves a useful text equivalent.

Critical condition

Candidate descriptors match real file dimensions and browser source selection is observed rather than promised.

CriterionPointsEvidence
Evidence and correctness30Calculations, source use and results match the supplied case; limitations are honest.
Required artifacts30All five stage outputs and the capstone handoff are present and inspectable.
Reasoning and decisions20Choices, assumptions, alternatives and the case-specific critical condition are explained.
Reproducibility10A reviewer can follow the stated steps and distinguish expected from observed results.
Clear communication10Labels, units, structure and evidence references make the work easy to review.

Score at least 80/100, supply every required artifact, and satisfy the path-specific critical condition. Rework missing evidence before marking complete.

Worked reference

All candidates share width/height = 1.75. A 700-CSS-pixel slot on a high-density screen may need more than 700 source pixels, but the browser ultimately chooses. The test report should record currentSrc instead of claiming that every mobile device downloads the 350-pixel file.

Boundaries

This is a local responsive-image exercise, not a verified production CDN configuration or a bandwidth guarantee.