The CSS object-fit property works in Chrome 32+, Edge 79+, Firefox 36+, Safari 10+, Opera 19+, and Samsung Internet 4+. See full browser support and values.

Prince Dewani
May 6, 2026
The CSS object-fit property is a W3C CSS Images Module Level 3 property that controls how a replaced element such as an img, video, or iframe is resized to fit its content box. It works in Chrome 32+, Edge 79+, Firefox 36+, Safari 10+ on macOS and iOS, Opera 19+, and Samsung Internet 4+, while Internet Explorer never shipped support.
This guide covers what object-fit is, the browsers that support it, the property values, the use cases, and the known issues.
object-fit is a CSS property defined by the W3C in CSS Images Module Level 3. It tells the browser how to size a replaced element, such as an img or video, inside its content box. The five allowed values are fill, contain, cover, none, and scale-down.
object-fit ships by default in every modern engine. The Web Platform Baseline marks it as Widely Available across Chromium, Gecko, and WebKit, with Internet Explorer the only major engine that never added the property.
Chrome supports object-fit from Chrome 32 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 4 to 31 did not support the property at all, so any image or video in those builds always uses the default fill behavior and stretches to its container.
Microsoft Edge supports object-fit fully from Edge 79 on Windows, macOS, and Linux through its Chromium pipeline. Edge Legacy 16 to 18 only supported object-fit on img elements; video tags fell back to the default fill behavior. Edge 12 to 15 did not support the property at all.
Firefox supports object-fit from Firefox 36 on Windows, macOS, Linux, and Android. Firefox 2 to 35 did not parse the property, so legacy builds drop the declaration silently and the replaced element stretches to fill its box.
Safari supports object-fit fully from Safari 10 on macOS and from Safari 10 on iOS and iPadOS. Safari 7.1 to 9.1 on macOS and Safari 8 to 9.3 on iOS had partial support that worked on img tags but not on video. Safari 3.1 to 7 on macOS and Safari 3.2 to 7.1 on iOS did not support it.
Opera supports object-fit from Opera 19 on Windows, macOS, and Linux through its Blink engine. Opera Mobile picked up support from Opera Mobile 11 on Android, while Opera 9 to 18 dropped the property as unrecognized syntax.
Samsung Internet supports object-fit from Samsung Internet 4 on Galaxy phones and tablets through its Chromium base. Every shipped Samsung Internet build from 4 onward applies object-fit to img, video, and other replaced elements identically to desktop Chrome.
Modern Android WebView and Chrome for Android support object-fit from Chrome 32 forward. The legacy stock Android Browser (2.1 to 4.4) did not support the property; the 4.4.3 and 4.4.4 builds shipped a WebView that picks up object-fit through the underlying Chromium update.
Internet Explorer 5.5 through Internet Explorer 11 never added support for object-fit. Microsoft has retired Internet Explorer, so any legacy intranet pages that still need image cropping have to use a polyfill such as object-fit-images on img elements or fall back to a CSS background-image with background-size: cover.
Note: object-fit behaves differently across Edge Legacy, partial-support Safari builds, and modern engines. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
object-fit accepts five keyword values that decide how the replaced element scales inside its content box. The default is fill, but most production code uses cover or contain to preserve the aspect ratio of images and videos.
Pair any value with object-position to shift the scaled media inside the box. The default is 50% 50%, which centers the content; object-position: top keeps the top of a portrait image visible after a cover crop.
/* 1. Cover: fill the box and crop overflow. Useful for hero images and avatars. */
.card-image {
width: 320px;
height: 200px;
object-fit: cover;
object-position: center;
}
/* 2. Contain: fit the whole image inside the box, even if bars appear. */
.product-thumb {
width: 200px;
height: 200px;
object-fit: contain;
background: #f5f5f5;
}
/* 3. None: keep the image at its intrinsic size and crop with the box. */
.fixed-icon {
width: 64px;
height: 64px;
object-fit: none;
object-position: 0 0;
}
/* 4. Detect support before shipping a fallback. */
@supports not (object-fit: cover) {
.card-image {
background-size: cover;
background-position: center;
}
}object-fit replaces a stack of older techniques such as background-image hacks, JavaScript resize scripts, and absolute-positioned img wrappers. Most teams adopt it on responsive media grids, product galleries, and any layout where a fixed box has to display arbitrary user-uploaded content.
object-fit ships widely but still surprises teams that move from a JS-based crop to a pure CSS one. Most of the bugs come from missing dimensions on the img tag, video-tag gaps in Edge Legacy, and IE 11 traffic that needs a polyfill.
In my experience, the trap that bites teams hardest is shipping a card grid with object-fit: cover and forgetting that one CMS template missing the height attribute on its img tag will quietly fall back to fill on every card it renders.
All object-fit version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance