Product images / PRACTICAL ANSWER
Why Does My Product Look Wider on the Storefront Even Though the Original Photograph Has the Correct Proportions?
If a circular product becomes oval on your storefront but remains circular in the original photograph, inspect CSS object-fit before editing the image. The fill value can stretch an image to match a container with a different aspect ratio. Contain preserves proportions but may leave unused space, while cover preserves proportions by cropping. These are three different display outcomes.
Check the source and the rendered image separately
Download the exact photograph used by the affected product card and open it outside the storefront. Confirm that the product's proportions are correct. Then inspect the rendered image element, its CSS width and height, and its computed object-fit value.
MDN documents object-fit for replaced elements such as images. The property determines how the image content fits its element box; it does not rewrite the original file.
Record the image's intrinsic dimensions and the element's displayed dimensions. If the source is square but the displayed box is rectangular, the fitting rule matters. Do not conclude that a CDN resized the product incorrectly merely because the rendered photograph appears wider.
Also inspect whether the image is being used as an HTML image or a CSS background. The latter uses different fitting properties. This procedure concerns an image element whose appearance is controlled by object-fit.
Compare fill, contain and cover with one unchanged file
In a nonproduction theme preview, keep the same source image and fixed-size container. Change only the fitting value.
- fill: The image is stretched to occupy the box. Its intrinsic aspect ratio may be lost.
- contain: The complete image fits inside the box with its proportions preserved. Empty space can remain.
- cover: The image fills the box proportionally, potentially hiding content outside the visible area.
These distinctions are documented by MDN. A correct cover implementation should not turn a circle into an ellipse, although it can cut away the circle's edge. A correct contain implementation should preserve the complete circle, although the card may have unused space.
If the image remains distorted with contain, inspect additional transforms, inherited styles and whether the source selected by the browser is actually the file you reviewed. Do not attribute every distortion to one CSS property.
Hypothetical circular tin in a rectangular card
Hypothetical illustration—not an executed browser test: a merchant has an approved 1200 × 1200 photograph of a circular tea tin. A custom collection card displays it inside a 300 × 200 CSS-pixel image box.
With object-fit: fill, the square photograph is stretched into the rectangular box. The tin can appear wider than it is tall. With contain, the complete square photograph fits proportionally, leaving space along the sides. With cover, the photograph fills the box while preserving its proportions, but some vertical content can be cropped.
The diagnostic question is not which treatment looks most attractive. It is whether the chosen treatment preserves the tin's actual geometry and all required product boundaries.
Record the three candidate presentations against the same source file. If the merchant requires both a completely visible tin and an edge-to-edge rectangular image area, the design may need a different composition or container rather than another fitting value.
Repair the container policy, not the product shape
Choose contain when preserving the entire product is the priority and unused space is acceptable. Choose cover only when the resulting crop retains all essential details. Avoid fill when the container ratio differs from the photograph and accurate product proportions matter.
Inspect the actual storefront at narrow and wide viewport sizes. A fitting rule that works in one card may behave differently in a promotional banner or enlarged gallery. Keep source selection, CSS fitting and layout dimensions as separate records.
Do not compensate for a stretched product by generating a deliberately narrower replacement image. That would make the asset dependent on an incorrect display transformation and could distort it elsewhere.
Accept the repair when the original and displayed product retain the same proportions, required edges remain visible, and the image container behaves predictably. If the remaining problem is a crop rather than distortion, investigate object-position or the composition's available margins.
Record your own observations
The filled rows are illustrative examples. Use the blank row for your own files and observations.
| Hypothetical presentation | Source dimensions | Display box | Fitting value | Expected diagnostic observation | Decision |
|---|---|---|---|---|---|
| Tea tin baseline | 1200 × 1200 | 300 × 200 CSS px | fill | Circle may appear oval | Reject geometric distortion |
| Complete product | 1200 × 1200 | 300 × 200 CSS px | contain | Circle preserved with unused side space | Candidate when full outline matters |
| Edge-to-edge card | 1200 × 1200 | 300 × 200 CSS px | cover | Circle preserved but image cropped vertically | Inspect required boundaries |
What the references establish
- MDN — object-fit CSS Property: Defines fill, contain and cover, including whether each preserves the intrinsic aspect ratio and whether cropping or unused space can occur.
Sources and further reading
Recorded source-review dates are listed individually below. An undated source does not inherit the article’s publication date. Software and platform rules can change; check the current original before acting.
- MDN — object-fit CSS Property · Review date not separately recorded
Frequently asked questions
Can object-fit: cover make a product wider?
It preserves the image's intrinsic aspect ratio, so it should not stretch the product. It can crop the image and change which portions remain visible.
Should I make every source photograph the same aspect ratio?
Not necessarily. First establish the display contract. Different product shapes may require different compositions or a proportional contain treatment.
PREPARE ASSETS FOR YOUR NEXT STEP
Create supporting product assets in CartVisual.
Create new product creative assets in the workspace, then continue in your chosen tools. Third-party software procedures described in this guide take place in those applications; this workspace link does not imply an integration. Check current capabilities, account access and credit quotes.
Create account and open this workspace Check pricing and creditsStart with free concept and copy planning after sign-in. Image and video generation require available credits; review the quote before starting.
Already have an account? Open the workspace.