When uploading a product with transparent background, the current color is black. Both on Collection page and on the Product page. Where can I change that?
Thank you so much in advance!
A user is trying to change the black background color that appears behind product images with transparent backgrounds on both collection and product pages in the Shopify Habitat theme.
Problem identified:
Proposed solution:
.product__media img and .collection__image imgbase.css or theme.css in the Assets folderCurrent blocker:
base.css or theme.css files in their Assets folder (screenshots show different file structure)Multiple screenshots were shared showing the theme customization interface and file structure to help troubleshoot the issue.
When uploading a product with transparent background, the current color is black. Both on Collection page and on the Product page. Where can I change that?
Thank you so much in advance!
Thank you for helping out! These steps is not available under Typography or Color options. Please see attachment.
Unpublished. Can I share link and code in a private message?
Hi @JimiT1
Please, share your store URL. Thanks!
Hello @JimiT1
The black background appears because Shopify automatically applies a default background color when a transparent image is uploaded.
How to Change the Background Color for Transparent Images:
Go to Shopify Admin → Online Store → Themes → Edit Code.
Open base.css (or theme.css) file under the Assets folder.
Add this CSS at the bottom:
.product__media img, .collection__image img {
background-color: white !important;
}
Thank you! This is the solution I am looking for. But under Assets folder I don’t have base.css or theme.css? Please see attached images.