{"title":"Media image styling reference","slug":"pos-media-image-styling-reference","url":"https://support.storeconnect.com/articles/pos-media-image-styling-reference","url_markdown":"https://support.storeconnect.com/articles/pos-media-image-styling-reference.md","subtitle":null,"summary":"Every part and component property for restyling the POS\u0026#39;s images with CSS, such as the pictures on product cards, the thumbnails on cart rows and order items, and the gallery on a product\u0026#39;s screen, with tested examples such as showing all of each picture instead of cropping it, and the list of what can\u0026#39;t be styled yet.","type":"Developer_Documentation","video_url":"","keywords":"pos image css, media-image-root, media-image-picture, media-image-placeholder, --sc-media-image-size, --sc-media-image-width, --sc-media-image-height, --sc-media-image-aspect-ratio, --sc-media-image-object-fit, --sc-media-image-radius, --sc-media-image-border, --sc-media-image-placeholder-bg, product image css, placeholder image, pos styling api, pos parts","last_modified":"2026-11-16T23:35:00+0000","body_markdown":"A media image is a picture of a product or another record, in the box a screen gives it, or a\nplaceholder with a faint icon when there is no picture. Follow the\n[POS styling API](pos-styling-api#rules) rules when styling it.\n\n## Where it appears\n\nThe image on a product card and an action tile, the thumbnail on a cart row and on an order's\nitems, the pictures in a list item and the variants menu, the stack of thumbnails a bundle\nshows, and the gallery on a product's screen.\n\nA screen sizes and shapes the image for where it sits, with the size, shape, corners, and\nshadow set around the image, so a property set on `:root` doesn't reach those images. A\nproperty set on `media-image-root` does, everywhere. The width and height reach an image only\nfrom a rule for the image itself, so set on `:root` or around an image they reach none. The\ncard and the cart item card also publish properties for the image inside them,\n`--sc-card-image-*` and `--sc-cart-item-card-media-*`, which change only those.\n\n## Parts\n\n| Part | What it is | Available from |\n| --- | --- | --- |\n| `media-image-root` | The whole image: the box with the corners, border, and shadow, holding the picture or the placeholder. | v22.0.13 |\n| `media-image-picture` | The picture itself, when there is one. | v22.0.13 |\n| `media-image-placeholder` | The box drawn in place of a picture when there is none, with a faint icon in it. | v22.0.13 |\n\nThe **Available from** column shows the first release that carries the name.\n\n## Component properties\n\nSet these on `media-image-root` to change every image.\n\n| Property | What it sets | Default | Available from |\n| --- | --- | --- | --- |\n| `--sc-media-image-size` | The width and height of the image, in place of the size the screen gives it. | none | v22.0.13 |\n| `--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 |\n| `--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 |\n| `--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 |\n| `--sc-media-image-aspect-ratio` | The shape of the image, as width / height, on the side the size leaves free. | none | v22.0.13 |\n| `--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 |\n| `--sc-media-image-radius` | The corners of the image and the placeholder. | 8px | v22.0.13 |\n| `--sc-media-image-border` | A border around the image, as a border shorthand. | none | v22.0.13 |\n| `--sc-media-image-shadow` | The shadow under the image, as a box shadow. | none | v22.0.13 |\n| `--sc-media-image-placeholder-bg` | The fill of the placeholder. It falls back to the raised surface color. | none | v22.0.13 |\n\n## Examples\n\nEach example is tested against the POS on every change.\n\n**\"Round the images less.\"**\n\n```css\n\n[part~='media-image-root'] {\n  --sc-media-image-radius: 4px;\n}\n```\n\n**\"Show all of each picture instead of cropping it.\"**\n\n```css\n\n[part~='media-image-root'] {\n  --sc-media-image-object-fit: contain;\n}\n```\n\n**\"Give the placeholders a white fill.\"**\n\n```css\n\n[part~='media-image-root'] {\n  --sc-media-image-placeholder-bg: #ffffff;\n}\n```\n\n**\"Draw a thin border around every image.\"**\n\n```css\n\n[part~='media-image-root'] {\n  --sc-media-image-border: 1px solid #d0d5dd;\n}\n```\n\n**\"Show the pictures in black and white.\"**\n\n```css\n\n[part~='media-image-picture'] {\n  filter: grayscale(1);\n}\n```\n\n## What can't be styled yet\n\n- A muted, disabled, or loading image, which has no attribute to tell it apart yet\n- The dashed border a media group draws around an expired image, and the way a media group stacks the images\n- 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\n- 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\n\n## Retired\n\nNone yet."}