This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this script to all of png images shown in the page. The CSS code added by the script is :
1 2 3 4 5 6 7 8 9 | .png { background-image: expression( this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + (this.tagName==\'IMG\' ? this[\'src\'] : this.currentStyle[\'backgroundImage\'].split(\'\"\')[1]) + ")", this.runtimeStyle.backgroundImage = "none", this.src = "{plugindir}/pixel.gif", this.width = this.style.width | this.clientWidth, this.height = this.style.height | this.clientHeight ); }'; |
And the jQuery code which applies this css to all of the png images :
1 2 3 4 5 | $(document).ready(function(){ if(($.browser.msie)&(parseInt($.browser.version)<7)){ $("img[src$='.png']").each(function(){$(this).addClass("png");}); } }); |
That’s all. The jQuery library is included in the plugin so you don’t need to modify anything.
Installation is simple. Just follow these steps :
- Upload ‘wp-pngfix’ directory to the ‘/wp-content/plugins/’ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Thats all. Go to any page which contains some png images with IE and check if there’s any errors.
This should fix them all except backgrounds now.
Download: Official WordPress plugin page : http://wordpress.org/extend/plugins/wp-pngfix/
Note: This type of fixes cause slight color changes to your png images with background color, so you may have to change some css.If you use images without inner backgrounds and only need to show the background transparent, forget that note
People who looked at this item also looked at…
Related items












35 (New) WordPress Plugins for an Effective Blogging Experience | TuVinhSoft .,JSC on 30 October 2009
[...] from here 15) WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this [...]
35 (New) WordPress Plugins for an Effective Blogging Experience | huibit05.com on 5 October 2009
[...] from here 15) WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this [...]
Gary Crossey on 20 September 2009
GOT MY SITE TO VALIDATE WITHOUT ANY VALIDATION WARNING – with PNGFIX
In the pngfix.php
Revise the & and < (less-than) sign with the code below.
if(($.browser.msie)"&"(parseInt($.browser.version)<7)){
Hope that helps.
Taha Paksu on 21 September 2009
Is the plugin still working after you did that?
Gary Crossey on 20 September 2009
I use the PNGFIX to fix PNG transparency images that I have posted on my gallery page: http://irishguy.info/graphic-design/ – the plug-in works great.
However, when trying to validate my website I got two warnings.
if(($.browser.msie)&(parseInt($.browser.version)<7)){
The first error is for the "&" and the second is for using the "<"
To solve the first error I changed the & to "&"
Still trying to figure out how to validate without a warning for the "<" (less than sign) being included.
Any suggestions. Thanks for the plug-n
shane plasebo on 12 April 2009
Is it compatible with wordpress 2.7.1 ? Please help…
Brendan on 27 March 2009
heres the link
Brendan on 27 March 2009
I installed your code for a png hack and at the top of the page on IE 6 I there is excessivel code ” ‘; ?>” (without the quotes)
On the most recent safari I see ‘; ?>
I have been trying to get these hacks out for a while and have had no luck. Any help would be appreciated
N on 10 February 2009
Another solution that I found to work, is to add “jQuery.noConflict();” at the beginning of the pngfix.php’s javascript code (right before “jQuery(function($){“).
Voya on 13 January 2009
Hey kardasi! This might be useful, i will test it out later!
Just a note – use javascript without noscript to handle this : If you wish to donate, you can click one of the google ads – it’s against google policy, if they find out that, they will ban you.
try this instead ( since google can’t read JS, or use an image! )
document.write ( “If you wish to donate, you can click one of the google ads “);
cheers
Taha Paksu on 25 January 2009
Voya : Thank you
I’ll try that
5 Plugins That Could Save Your Skin | Designbus on 4 December 2008
[...] 4. PNG-24 FIX [...]
MuSnake on 7 November 2008
getting closer…
change source attribute of line 31 of pngfix.php to:
[code] '. ABSPATH . WPINC . '/js/jquery.js[/code]
MuSnake on 7 November 2008
Let’s try that again…
change line 31 of pngfix.php to:
[code]';[/code]
MuSnake on 7 November 2008
Plugin conflicts with my other jQuery.
edit pngfix.php, line 31:
`’;`
to
`’;`
精选插件 | CALLME8(呼我吧)网扎小折 on 1 November 2008
[...] WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this [...]
(最新) 美化你博客的利器-WordPress 插件 | Satime on 31 October 2008
[...] WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this [...]
VietNam WordPress Club » 35 (New) WordPress Plugins for an Effective Blogging Experience on 19 September 2008
[...] from here 15) WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this [...]
Novos emoticons • jlcarneiro.com on 22 June 2008
[...] Taha Paksu desenvolveu o pngfix, um plugin para corrigir o problema do Internet Explorer 6 com transparência em figuras PNG usando [...]
ponche on 20 June 2008
thanks for the help taha paksu, but i can’t improve your plugin with the lightbox.. i give up and finally i put gif instead the pngs.
good luck with the plugin! works perfects except with lightbox!