Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I provide transparent product images? 
 
Napier
Member
 
Total Posts:  47
Joined:  2008-05-24
 

Hey Guys,
Does Magento not support transparencies in the product view section of the site?  I have tried on multiple designs and the background of any transparent part of the product image are black!  At first I thought I was saving the image incorrectly but in the RSS feeds (and other places) transparency works perfect.

Tried multiple formats and gif and png.

Please note: this is using Firefox version 2.0 - I havent tested with other browsers as of yet but the transparency works fine in other parts of the site so I am guessing there is some kind of code or something stopping it from working here.

Frankly I am suprised theres been no talk about this on the forums - I would imagine most of you guys are using transparency in their product images?

Image Attachments
transparent.gifrssproof.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
Napier
Member
 
Total Posts:  47
Joined:  2008-05-24
 

??? anything?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Napier
Member
 
Total Posts:  47
Joined:  2008-05-24
 

I REALLY dont understand how you guys dont support transparencies in product images - i would say 90-100% of people use this feature and its wrong.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Napier
Member
 
Total Posts:  47
Joined:  2008-05-24
 

bump bump bump bump

 
Magento Community Magento Community
Magento Community
Magento Community
 
pixelpusher
Sr. Member
 
Avatar
Total Posts:  135
Joined:  2008-04-23
SoCal
 

My images work fine. how are you making your pngs?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Napier
Member
 
Total Posts:  47
Joined:  2008-05-24
 

i’ve literally tried every setting in photoshop

 
Magento Community Magento Community
Magento Community
Magento Community
 
pixelpusher
Sr. Member
 
Avatar
Total Posts:  135
Joined:  2008-04-23
SoCal
 

you wouldn’t by chance have a image css tag with background-color: #000000; would you?
CSS styles are the only thing that would make a color show up like that code wise.

I’d test with some other browsers as well maybe even another installation of firefox on the same type of OS…
if your able, post your site here, I’d gladly tell you how it looks on my end

Magento definitely has the ability.
(The pngs are soo cool when you zoom in on an image and double click!)

I’ve been making my pngs through photoshops web image saving utility. [ file> save for web & devices > set to png-24 with transparency box checked and make sure the interlaced option isn’t enabled]

 
Magento Community Magento Community
Magento Community
Magento Community
 
Napier
Member
 
Total Posts:  47
Joined:  2008-05-24
 

its not a transparency issue - its the actual small image has the dark background.

http://www.mindstatedistribution.com

http://www.mindstatedistribution.com/media/catalog/product/cache/1/small_image//170x135/l/r/lrgbrowntee1_1.gif

http://www.mindstatedistribution.com/media/catalog/product/cache/1/image//l/r/lrgbrowntee1_1.gif

while the large one does not…

 
Magento Community Magento Community
Magento Community
Magento Community
 
pixelpusher
Sr. Member
 
Avatar
Total Posts:  135
Joined:  2008-04-23
SoCal
 

Does this happen with pngs too? Thats probably the better format anyways to show the same image over multiple backgrounds. I would look to your sever and see if you have GD 2 functioning correctly. since it seems to be only your server created images that are effected.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kadima
Member
 
Total Posts:  58
Joined:  2007-10-21
 

Did you perhaps set watermarks in your installation?

 
Magento Community Magento Community
Magento Community
Magento Community
 
brandondrew
Member
 
Avatar
Total Posts:  64
Joined:  2007-09-12
 

I can confirm this--it’s happening to me too.

Transparent images are being modified by Magento somehow (using GD?) and being done incorrectly.  All GIFs with transparency have their transparency replaced with black. 

This is definitely happening on the server-side, not due to user error.  It is not being done by CSS, because I can open the image by itself in a browser window, and it is not the same as the image I imported--it even has a different name.  It appears that *perhaps* Magento is resizing images to (e.g.) 135 x 135 (even though I already had them at that size), and doing it poorly.  (@Varien:) It would be very nice to be able to control this, rather than having it mangle my already perfectly sized and optimized images. 

Here’s the URL format of the bad images:
/media/catalog/product/cache/1/small_image//135x135/t/h/the-starry-sky.135_1.gif
Here’s the URL format of good images, exactly as I created them:
/media/catalog/product/t/h/the-starry-sky.135_1.gif

(@Varien:) If the problem is created by something underneath Magento (like GD) then it would be helpful if Magento would verify that the version of GD is correct, etc., during installation, and give a warning that such things as this will happen, as well as allow the (admin)user to turn off this server-side image processing, and allow them to specify whether to use the image *as*uploaded* or the processed image.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdb
Sr. Member
 
Avatar
Total Posts:  223
Joined:  2007-11-13
coastal California, USA
 
brandondrew - 16 June 2008 08:52 AM

I can confirm this--it’s happening to me too.
allow the (admin)user to turn off this server-side image processing, and allow them to specify whether to use the image *as*uploaded* or the processed image.

Actually, considering the number of people that tweak the imaging system to their own needs anyways, giving admins an easy way to turn the image magic off wouldnt be a bad idea.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top