Re: changing color of transparent product image background

changing color of transparent product image background

Dat999
Explorer
69 0 26

Hi, I'm looking for a solution to change the colour of all my product image backgrounds. The background of the images will be transparent and I need to change it to a grey colour, for example #f5f5f5. I have done this on the dawn theme with this code in the theme.liquid file:

<style>
.media.media--transparent{
background-color: #f5f5f5 !important;
}

</style>

 

Dat999_0-1720260777427.png

 

The problem is, that I am switching to the impact theme and the code above isn't working with this theme. I appreciate all the help you can offer guys! 

Replies 7 (7)
Dat999
Explorer
69 0 26

Hi!

 

Dat999
Explorer
69 0 26

Unfortunately, thats not what I'm after. I need my product images to have a transparent background but also to look like the image above, with a grey background from the website view

Eddie_specialst
Shopify Partner
34 1 3

Hello,

There are Shopify apps available that might offer automatic background removal as part of their features. You can search the Shopify App Store for image editing or background removal apps.

Eddie_specialist
Dat999
Explorer
69 0 26

Ideally I'm looking for a simple code that will do the job, just like the one I use in my dawn theme. 

Eddie_specialst
Shopify Partner
34 1 3

You should try the code on it again and if it is not compatible with the theme then you need to make use of configuration plugins on the shopify app store.

Eddie_specialist
Dat999
Explorer
69 0 26

The code I use for the dawn theme unfortunately doesn't work for the impact theme. I tried to put it everywhere. I'm keen of solving this with code, so I'll keep looking and trying. Thanks!

 

Eddie_specialst
Shopify Partner
34 1 3

okay I will just advice you to put it in the theme liquid file you use when doing it with free theme.

Eddie_specialist