Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

How to Choose the Right Web Image Crop

Choose a web image strategy based on whether the whole composition, subject framing, or only pixel dimensions should change.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a web image strategy by deciding what must stay unchanged: the entire composition, the subject’s prominence across layouts, or just the image’s pixel dimensions. Use CSS object-fit: cover when a fixed frame may clip the edges; use contain when the whole image must remain visible; use <picture> for a different crop at a breakpoint; and use srcset with sizes when only resolution should change.

Decide what the layout needs to preserve

  • Keep the whole image visible: use object-fit: contain. It preserves the image’s aspect ratio, but may leave empty bands inside a frame with a different ratio.
  • Fill a fixed frame and allow edge clipping: use object-fit: cover, then adjust the visible area with object-position.
  • Change the composition for a layout: prepare alternate crops and select them with <picture> and media conditions.
  • Keep the composition but serve different pixel widths: provide candidates with srcset and describe the rendered slot with sizes.

These choices solve different problems. CSS fitting changes how a selected image is rendered in its box; it does not make a new image file. A different composition requires an alternate source, while resolution switching supplies the same composition at different dimensions.

As an Amazon Associate I earn from qualifying purchases.

Crop within a fixed frame using CSS

object-fit controls how replaced content such as an <img> fits its content box. For a card whose frame should be filled, cover preserves the image ratio and clips the excess when the ratios differ. The default alignment may cut off the important subject, so set object-position to move the visible region.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
.card-image {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  object-position: 50% 35%;
}

The percentages are an example, not a universal focal point; choose alignment by checking the actual image in its frame. MDN’s object-fit reference describes the available fitting behaviors.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

When the full composition must remain visible

Use contain when clipping could remove relevant information. It keeps the whole image and its proportions, which can leave letterboxing or pillarboxing if the frame’s shape differs.

Other fitting values

  • fill stretches content to the box and can distort photographs.
  • none leaves the source at its natural size.
  • scale-down chooses the smaller rendered size of none and contain.

Use alternate crops when the composition should change

Use <picture> when the image itself should differ by layout—for example, a wide scene on a large screen and a tighter portrait crop on a small one. The browser evaluates the sources’ media, srcset, and type attributes; the nested <img> provides the fallback and carries the image’s presentation information.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
<picture>
  <source
    media="(max-width: 40rem)"
    srcset="portrait-crop.webp"
    type="image/webp">
  <img src="wide-crop.jpg" alt="Describe the meaningful image content">
</picture>

The example uses a narrow-screen condition; set the breakpoint and files to match the page and assets. Inspect every crop at the sizes where it appears. If a crop removes a person, text in an infographic, or other essential information, use another crop or show the whole image. MDN explains picture source selection, art direction, format choices, and fallback behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use responsive candidates when only resolution changes

When the composition stays the same but the rendered image may need different pixel widths, offer candidates in srcset and describe the expected layout slot in sizes. The browser uses that information to choose a resource; calculate the slot from the actual layout rather than copying an example blindly.

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
<img
  src="scene-800.jpg"
  srcset="scene-480.jpg 480w, scene-800.jpg 800w, scene-1200.jpg 1200w"
  sizes="(max-width: 40rem) 100vw, 50vw"
  width="1200"
  height="800"
  alt="Describe the meaningful image content">

The filenames and dimensions above are illustrative. Use width and height values that match the supplied assets. Responsive markup does not guarantee a fixed bandwidth saving: results depend on the page, available sources, browser choice, device, and network. MDN’s responsive images guide distinguishes resolution switching from art direction and gives an illustrative example in which its 480-pixel example is 63 KB versus 128 KB for its 800-pixel example—a 65 KB difference, not a general benchmark.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep formats, fallback, and accessibility in the implementation

Offer a supported format with a fallback

<picture> can provide format alternatives using type, with a suitable fallback in the nested <img>. MDN notes that AVIF and WebP may not be supported by every browser, so check compatibility for the intended audience rather than assuming every visitor can use a newer format.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Write useful alternative text

Provide concise alt text that communicates the image’s relevant content. Cropping does not remove the accessibility responsibility of the <img> element. If different crops change what is meaningful, make sure the text remains an appropriate replacement for the selected image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reserve space and allow images to reflow

Where possible, include intrinsic width and height on the image. MDN explains that these dimensions let the browser allocate space before loading, helping mitigate layout shifts. A basic responsive rule is:

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
img {
  max-width: 100%;
  height: auto;
}

A fixed-height crop can suit a card or tile, but check it at narrow widths and zoom. W3C WAI’s C37 technique describes checking that images fit without two-direction scrolling in a 400% zoom scenario. The technique page, updated 12 January 2026, says: “Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG).” C37 is an example, not a requirement when another implementation satisfies WCAG.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.