web-placement / BACKGROUND REMOVAL
Fit a Transparent PNG With CSS Object Fit Without Deforming It
Compare content-box geometry and intrinsic proportions to choose contain, cover or another fit.
Open the free Background Remover ↗The real before and after
599 × 324 px

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.
Set the image element's box first, then choose how its intrinsic rectangle should fit it. Use contain to preserve the whole canvas or cover when cropping is acceptable. Check the visible subject separately from the transparent padding. The browser can fit the entire PNG and still leave the foreground smaller than expected.
Measure both rectangles
Open the PNG and note its intrinsic width and height. In the browser inspector, measure the image element's content box. An image with a wide clear margin may have a tall visible subject inside a wide file. CSS fits the complete raster rectangle when you set object-fit, including every transparent pixel around that subject.
Compare fitting strategies
With a fixed box, contain scales the image uniformly to fit fully inside it. Cover also uses uniform scaling but fills that box, potentially clipping part of the image. Fill can stretch the raster to both dimensions. Try the appropriate fit in the site styles and compare a recognizable proportion with the approved cutout.
Plan around the visible feature
Turn on a temporary border or use devtools to see the full element. Inspect the closest important edge under the proposed fit. If cover clips a handle, consider a less constrained box, a suitable object-position or a placement-specific crop made in an external editor. Preserve the approved master while you prepare any derivative.
Test the component at two widths
Resize the actual page and measure the new box. Check that the same intended features are visible and undistorted. If the mask edge appears poor in both placements, inspect the downloaded Pexure PNG on a contrasting background. A CSS fit change alters placement, while a genuinely rough original edge requires source or mask review.
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 site layout to compare the subject rectangle with the box CSS sizes.
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.