---
title: "Media image styling reference"
source: https://support.storeconnect.com/articles/pos-media-image-styling-reference
type: article
format: markdown
site: StoreConnect Support — product and developer documentation for StoreConnect
site_index: https://storeconnect.com/llms.txt
docs_index: https://support.storeconnect.com/llms.txt
note: Append .md to any page or article URL on this site to get its Markdown form.
---
# Media image styling reference

A media image is a picture of a product or another record, in the box a screen gives it, or a
placeholder with a faint icon when there is no picture. Follow the
[POS styling API](pos-styling-api#rules) rules when styling it.

## Where it appears

The image on a product card and an action tile, the thumbnail on a cart row and on an order's
items, the pictures in a list item and the variants menu, the stack of thumbnails a bundle
shows, and the gallery on a product's screen.

A screen sizes and shapes the image for where it sits, with the size, shape, corners, and
shadow set around the image, so a property set on `:root` doesn't reach those images. A
property set on `media-image-root` does, everywhere. The width and height reach an image only
from a rule for the image itself, so set on `:root` or around an image they reach none. The
card and the cart item card also publish properties for the image inside them,
`--sc-card-image-*` and `--sc-cart-item-card-media-*`, which change only those.

## Parts

| Part | What it is | Available from |
| --- | --- | --- |
| `media-image-root` | The whole image: the box with the corners, border, and shadow, holding the picture or the placeholder. | v22.0.13 |
| `media-image-picture` | The picture itself, when there is one. | v22.0.13 |
| `media-image-placeholder` | The box drawn in place of a picture when there is none, with a faint icon in it. | v22.0.13 |

The **Available from** column shows the first release that carries the name.

## Component properties

Set these on `media-image-root` to change every image.

| Property | What it sets | Default | Available from |
| --- | --- | --- | --- |
| `--sc-media-image-size` | The width and height of the image, in place of the size the screen gives it. | none | v22.0.13 |
| `--sc-media-image-width` | The width of the image alone, in place of the size, or auto to let the shape decide it. It applies only when set on the image itself. | none | v22.0.13 |
| `--sc-media-image-height` | The height of the image alone, in place of the size, or auto to let the shape decide it. It applies only when set on the image itself. | none | v22.0.13 |
| `--sc-media-image-default-size` | The size of an image nothing else sizes. The POS sets it on each image it gives a size, so it reaches only the rest. | none | v22.0.13 |
| `--sc-media-image-aspect-ratio` | The shape of the image, as width / height, on the side the size leaves free. | none | v22.0.13 |
| `--sc-media-image-object-fit` | How the picture fills the image, such as cover to crop it or contain to show all of it. | cover | v22.0.13 |
| `--sc-media-image-radius` | The corners of the image and the placeholder. | 8px | v22.0.13 |
| `--sc-media-image-border` | A border around the image, as a border shorthand. | none | v22.0.13 |
| `--sc-media-image-shadow` | The shadow under the image, as a box shadow. | none | v22.0.13 |
| `--sc-media-image-placeholder-bg` | The fill of the placeholder. It falls back to the raised surface color. | none | v22.0.13 |

## Examples

Each example is tested against the POS on every change.

**"Round the images less."**

```css

[part~='media-image-root'] {
  --sc-media-image-radius: 4px;
}
```

**"Show all of each picture instead of cropping it."**

```css

[part~='media-image-root'] {
  --sc-media-image-object-fit: contain;
}
```

**"Give the placeholders a white fill."**

```css

[part~='media-image-root'] {
  --sc-media-image-placeholder-bg: #ffffff;
}
```

**"Draw a thin border around every image."**

```css

[part~='media-image-root'] {
  --sc-media-image-border: 1px solid #d0d5dd;
}
```

**"Show the pictures in black and white."**

```css

[part~='media-image-picture'] {
  filter: grayscale(1);
}
```

## What can't be styled yet

- A muted, disabled, or loading image, which has no attribute to tell it apart yet
- The dashed border a media group draws around an expired image, and the way a media group stacks the images
- The default size of an image the POS gives a size, which the POS sets on the image itself: set `--sc-media-image-size` instead
- The size a screen gives an image, which a property set on `:root` doesn't reach: set it on `media-image-root`, or on the card's or the cart row's own property

## Retired

None yet.

---

## Follow StoreConnect

- [Email Newsletter](https://storeconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://storeconnect.com/partners)
- [Become a Partner](https://storeconnect.com/become-a-partner)
- [News](https://storeconnect.com/articles/news)
- [Events](https://storeconnect.com/articles/events)
- [Feature Comparison](https://storeconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://storeconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

## Machine-readable

- [Site index for agents](https://storeconnect.com/llms.txt): curated map of the StoreConnect site in llms.txt format
- [Documentation index for agents](https://support.storeconnect.com/llms.txt): full technical and product documentation map

Every page and article on this site has a Markdown rendering: append `.md` to its URL.

Continue in Markdown: [Help documentation](https://support.storeconnect.com/help-documentation.md) · [Developer reference](https://support.storeconnect.com/developer-reference.md) · [Videos & tutorials](https://support.storeconnect.com/videos-tutorials.md) · [Release notes](https://support.storeconnect.com/release-notes.md)

---

StoreConnect Support — https://support.storeconnect.com/articles/pos-media-image-styling-reference