PNG with transparent background turns black when uploaded and resized

Steps to reproduce:

  1. Create a PNG-8 with a transparent background.
  2. Upload to WordPress 3.3.1.
  3. View original PNG in any browser, Chrome, Firefox, IE, etc. Notice that it retains transparency as it should.
  4. View a resized version of that PNG in any browser. Observe that the transparent portions of the PNG are now black.

Examples:

Read More

This occurs even with a clean install of WordPress 3.3.1 with no plugins activated. Any ideas on what might be causing this bug? I’ve been searching all over this forum, the WordPress support forums, and anywhere else Google can find. All I see out there are mentions of a NextGEN Gallery plugin bug and the infamous IE6 PNG transparency bug, neither of which appear to pertain to this problem.

Thanks in advance.

Related posts

Leave a Reply

4 comments

  1. I can save you hours searching on the internet to solve this problem.
    Make sure you do this when adding a PNG to WordPress

    png must be png 24 bit
    If you are adding a logo to your WordPress site make sure the size of the logo is the exact size of what is already there.
    If the size of the png is too big it makes the transparent background go black.

  2. I got a similar problem: my PNG with transparency wasn’t recognized by WordPress.
    It turns out that my PNG got imbeded a custom color profile. Once a took out and replace by a standard one, it worked fine.