Responsive image art direction: plan the crop for the frame
Plan image variants around what each layout needs viewers to notice. Separate a deliberate crop change from resolution choices, keep the HTML fallback meaningful, and test each frame with its real text.
A smaller frame can change the picture’s job
A wide banner and a narrow card do not always need the same rectangle of a photograph. Shrinking one wide image until it fits may leave the subject too small to read; cropping its sides can remove the hand, tool, or setting that explains the scene. Art direction begins by asking what the image must communicate in each placement, then making a crop that serves that purpose.
Keep that decision separate from image resolution. A set of files showing the same crop at different pixel densities offers choices about resource size and sharpness. A portrait crop and a landscape crop make different compositional claims. The HTML Standard describes the picture element as a way to provide alternative image resources based on conditions such as viewport size, pixel density, or format. MDN distinguishes art direction, where an image is cropped or modified for a media condition, from supplying different resolutions of one image.
Design the alternatives before writing the markup
Start from the actual page layouts rather than familiar device labels. A narrow column may still be wide on a large monitor, and a small window may contain a two-column card. List the image’s placements, their frame shapes, the copy beside or over them, and the detail that must remain visible. Draw each frame over a copy of the source. Mark essential content, optional context, and any quiet area reserved for words.
Make a separate crop only when it improves the image’s role. A close view of a ceramic bowl may be useful in a compact workshop card, while a wider view with the maker’s hands may better introduce the process on a feature page. Preserve enough context that both alternatives still represent the same subject. If the smaller crop changes the meaning, reconsider whether it belongs as an alternative for the same image at all.
Then sort technical choices. Use responsive source selection for the intentional crop or format alternatives; use srcset and sizes on the img element when the crop stays the same but available pixel dimensions should match the rendered slot. Avoid multiplying exports without a named use.
Let the image element carry the essential meaning
In a picture element, source elements come before one img element. Their media conditions can describe when a crop is appropriate, and type can offer a supported format. The browser considers the candidates; the img remains the displayed image and supplies a fallback when none of those sources matches. Put the useful default there so the page still has an image when a condition is not met.
Keep each crop aligned with one meaningful text alternative. The W3C Web Accessibility Initiative explains that alternative text depends on the image’s purpose and context: an informative image needs its essential information, while a purely decorative one can use an empty alternative. If two crops communicate different essential facts, one shared description may not adequately represent them. Revise the editorial relationship or provide a more suitable content structure instead of assuming the crop alone solves the problem.
Do not treat a breakpoint as a command to switch every image to a portrait version. A source condition should reflect a real composition change. If the subject, space for copy, or reading context does not change, a flexible display of one crop may be clearer and easier to maintain.
Review the whole composition in context
Test each candidate at the dimensions where it will actually appear. Check whether a face, hand, label, or tool is clipped; whether a high-contrast fragment pulls attention to the edge; and whether nearby text has enough space. Then inspect the page with its real headline and caption. A crop that looks balanced alone can become crowded as soon as the words arrive.
Keep a simple decision note with each variant: the frame it serves, the visual information it preserves, and why the alternate is needed. Revisit it when the layout changes. Responsive image design is a small editorial system: the source, frame, text, and fallback should continue to tell a coherent story together.
Try it yourself
- List the real image placements and sketch each frame over a copy of the source.
- Name the information each crop must preserve and decide whether a genuine composition change is needed.
- Use picture sources for intentional art direction; use srcset and sizes for resolution choices within the same crop.
- Keep a useful img fallback and an alternative text appropriate to the image’s purpose.
- Preview every variant beside actual text at its rendered size, then record the reason for each file.
Worked example: a fictional ceramics workshop page
Imagine a page promoting a fictional ceramics workshop. The source photograph shows a person shaping a bowl at a worktable, with shelves and tools behind them. For a wide feature header, keep the hands, bowl, and enough studio context to establish the activity; leave an uncluttered side for the headline. For a narrow card, try a closer crop around the hands and bowl, but keep enough of the rim and clay to make the action legible. Compare both beside the same title and short caption. If the closer frame removes the person’s action or makes the object look like a finished product rather than work in progress, revise the crop. Describe the image for its role on the page, then confirm the picture’s default img still communicates the intended subject. This is a fictional design exercise, not a report about a real workshop or a user test.
References & further reading
- WHATWG: HTML Living Standard, The picture element ↗
- MDN: Using responsive images in HTML ↗
- W3C WAI: Images Tutorial ↗
Examples and exercises in this guide are original teaching scenarios.