responsive-cutouts / BACKGROUND REMOVAL

Write a Sizes Rule for a Transparent Image in a Responsive Column

Derive slot width from grid, gutters and breakpoints before checking selected candidates.

Open the free Background Remover ↗

The real before and after

599 × 324 px
Original licensed photograph: a silver spoon with a long narrow handle on a wide image canvas
Before
Actual Pexure background removal result: a silver spoon with a long narrow handle on a wide image canvas
After · transparent PNG

Compare the original and actual cutout. The grid indicates transparency. Display previews may be resized; view the full-resolution recorded PNG.

Sample: Spoon · John Hull / The Metropolitan Museum of Art · CC0. Processing: Pexure Studio, Automatic subject. No endorsement implied.

Write the sizes attribute to describe the cutout's actual CSS slot across breakpoints. Measure the container, gutters and columns before choosing each value. Pair the rule with truthful width descriptors, then inspect the selected resource and rendered width in the browser at representative layout sizes.

Map the slot at each breakpoint

Check the site's stylesheet and measure the image box. A single-column layout might have 16 pixels of padding on each side, producing a slot close to the viewport width minus 32 pixels. A two-column ratio may depend on a container max width, column gap and sidebar. Write down the actual layout constraints.

Describe the expected width, not the image file

Use matching media conditions and source-size expressions to represent the image slot. For a simple narrow rule, a calculation such as 100vw minus 32px can describe the available space. Put the more specific matching rule first and include an appropriate final source size for remaining viewports. Keep normal CSS responsible for actual layout.

Pair truthful candidates with the hints

Create equivalent derivatives from the transparent PNG in an external image workflow. Label each file by its actual pixel width in srcset, such as 480w for a 480-pixel raster. Keep aspect ratio and visible framing consistent. The browser uses the sizes hint with candidate widths and its selection logic, including screen density.

Check the browser's decision

Compare the image element's currentSrc and its rendered width at several breakpoints. Look for structural mistakes, such as a desktop rule still implying an almost full-width slot. Candidate choice can vary with browser conditions. Correct inaccurate hints when the actual slot and declared source size consistently diverge, then verify the visible edge on the served candidate.

About this demonstration

The comparison reuses the inspected photograph and automatic cutout. The automatic result retained the spoon bowl and long handle, including the narrow connection between them. A pale outline remains along portions of the spoon. The example stays on its original wide canvas; it was not stretched or rotated to look larger.

The reused photographic comparison shows a narrow horizontal form on a much wider canvas. Use your own image candidates to judge the served detail at the selected column width.

The displayed result was produced from the linked licensed source using Pexure’s existing free engine. This is an illustrative example, not a promise that every image will produce the same result.