Fixing the PNG bug in IE7

Yesterday while testing a simple hand-coded site locally I came up against the notorious error of PNGs not appearing in IE7 for Vista.  A site check which should have taken a few seconds turned into another afternoon lost to a browser bug.

What’s that, you say?  IE7 fixed the disappearing PNG error from IE6?  IE7 enabled PNG functionality?  Oh no it did-n’t, girlfriend.  In IE7, PNGs can occasionally fail to appear not due to markup errors or CSS conflicts, but botched registry entries.  Read on.

First, I tried two basic fixes specific to Vista:

  1. Disabling User Access Control (UAC), which you don’t need at all if you are the only person who uses your Vista machine.  This didn’t fix it.
  2. Right clicking on IE and running as Administrator (although I already am Administrator) – this didn’t fix it either.

I then found this page which explained how the issue was a known problem caused by the registry.  Some other software installation (it could have been anything) altered the file class and MIME settings for the PNG file type, which causes them to disappear in IE7, but not in anything else, of course. The author of that page provided an easy .reg merge file which would reset the settings for .PNGs, hopefully solving the problem.  Based on the comments left on his page, it looks like it worked for a lot of people.

But not for me.  When I tried to merge his registry file, I got the error message stating that “Not all data was successfully written to the registry. Some keys are open by the system or other processes.”   Someone on his page suggested breaking the merged .reg file into fifteen individual .reg files, merging them individually, and then researching fixing the ownership issues with the ones that were causing open keys…the mere thought of that had me losing the will to live, so I had to find another solution.

Another suggested solution was to run regsvr32 %WinDir%\system32\pngfilt.dll in the command prompt.  This promised to re-set the png functionality from Vista’s source files, and as with the fix described above, it seems to work for some.  But when I tried this, I got yet another error message: “The module C:\Windows\system32\pngfilt.dll was loaded but the entry-point dllregisterserver was not found. Make sure that C:\Windows\system32\pngfilt.dll is a valid DLL or OCX file and then try again.”  A colleague suggested using the System File Checker to repair that file from the Vista DVD.  Which would have been great if I had gotten a Vista DVD with this laptop.  But mine only came with the option to create a recovery or restoration CD, which would not fix that corrupt file.

So on to trying to change the file associations on the surface.  One suggestion which does seem to work for some people experiencing this problem was to right click on a PNG file, select Open With –> Choose Default Program –> Windows Photo Gallery.  Works for some, but not for me.

Finally, someone on LinkedIn pointed me to a discussion on Apple’s forums which provided the fix that worked.  The culprit seemed to be Quicktime, of all things.  Some suggested removing Quicktime altogether, but then iTunes wouldn’t work, and I’d break out in hives and start twitching.  So barring a full uninstall of Quicktime, according to that discussion on Apple’s forums, here is the solution to the PNG bug:

  1. In Quicktime, open and edit both QuickTime and Players preferences (edit, preferences) and disable everything you possibly can.
  2. Right click on a PNG file, Open With –> Choose Default Program –> Internet Explorer.
  3. Close IE, then load a PNG from the web via Internet Explorer.  It’s there?  Good.  Close IE.
  4. Right click on a PNG file, Open With –> Choose Default Program –> Windows Photo Gallery.

Sorted!  PNGs appear in IE7 again.

It’s hard to believe that this far along in the web design journey, we still have to re-train our browsers to recognise basic file types.  It’s harder still to believe that the fix to this problem almost involved de-merging registry files, digging out a nonexistent install DVD, and re-writing system-generated registry users.  All this hassle to get a tiny handful of graphics to appear on a simple site.  And they wonder why most of us would rather drink cold decaf coffee than give up Firefox?

Given how frequently Quicktime is refreshed, I have no doubt that this problem will reappear down the road.  At least I know how to fix it now – but that’s because I was aware of the problem and knew what I was looking for.  What about average web users who don’t know what a PNG is and will only be seeing a blank space where a graphic should be?  Could they navigate through the steps above?  No, and they shouldn’t have to, and to that end Microsoft needs to patch this error as soon as possible.

About these ads

25 thoughts on “Fixing the PNG bug in IE7

  1. Marissa says:

    So the only way to make IE7 in Vista work is to make the user edit their QuickTime preferences? That’s insane.

  2. When you get to step #3, where you test loading a PNG in IE after changing your Quicktime preferences, you’ll actually see the Quicktime logo flash onto the screen in IE, as if being smoked out of a hole!

  3. Tom says:

    Worked for me. Stupid crazy. I still don’t know why I continue to put myself through this. Definition of insanity, right?

  4. While PNG’s show up in my browser, whenever I open them individually, such as right-click, Open With, Internet Explorer, QuickTime opens them instead. Is there any way around THIS problem? I tried the above solutions just in case, but they didn’t work…

  5. Carol Rogers says:

    I was really elated to read your solution related to Quick Time but…. sadly I don’t have Quick Time installed. Do you have any idea what other program could cause the same problem, i.e. png link files not displaying in IE7.

    Thanks

  6. Sam Jarvis says:

    255 levels of alpha, that’s why we use PNGs.

    This is just another unbelievably retarded issue MS just can’t be assed to fix..

    So it goes.

  7. Somebody says:

    If the PNGs show when you run the explorer as Administrator; and they dont show for non-Administrator users, the problem is registry. Run regedit as non-Administrator user and browse through the entries under HKEY_CLASSES_ROOT\Mime\Database\Content. All entries under this should be readable by all users. If it shows read permission error while you are browsing these entries (just scroll up and down to check quickly), that is your ticket. You have to fix the entry to make it readable by all users.

  8. Steve says:

    @Somebody – this issue has been plaguing us for a long time at my work, we tried all the steps above including removing reinstalling flash, etc. One of the groups we support has to use IE 7 due to some sharepoint issues, so we can’t go to IE 8. Checking that registry key you posted worked!!!!!

  9. danno says:

    This is a problematic issue. I’ve had it happen twice. I use XP SP3. My countless hours of research would seem to suggest that the issue is likely Quicktime, though both times I think the issue manifested after installing updates to Adobe Flash Player.

    It seems for me the issue is one of something breaking permissions in the registry. Both times the following solution has worked for me:
    Open a cmd window.
    enter this:
    secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose
    wait ~5 minutes.
    Voila! Your .png’s are back! You don’t even need to reboot.

  10. Stevie says:

    Still not working. I went through and disabled everything I could in QT and QTP. When I try to open a .pg w/IE, I get the bar at the top of my browser that says “To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer. Click here for options…” If I tell it to allow it to run the scripts, then I get ANOTHER window that says, “SOme of the MIME types previously associated with the QuickTime plug-in are currently associated with other applications. Should I restore these MIME type associations to Quicktime?” I click NO, and the image displays, but it does NOT make any other png’s display in my browser. Also tried danno’s secedit solution, that didn’t work either. ANy other ideas? I should note that I only have this problem on THIS computer; on the other one in the house–same XP SP3, same IE7, and same QT–I do not have this problem.

  11. ArcoZakus says:

    Somebody (1 October 2010 at 01:39)

    THANK YOU SO MUCH!!! (Yes, that is shouting, but in a good way.)

    Adding “read” permission for Standard Users to the registry entry
    “HKEY_CLASSES_ROOT\Mime\Database\Content Type\application/futuresplash”
    fixed the problem for me.

    I first noticed the problem with the Google logo (a png file) showing as the little red “x” in IE7 after installing 12 updates from MS. No big deal — until I found that Google Maps were also broken. Big Deal.

    Big hassle unistalling/reinstalling the 12 Windows updates I had installed just before the problem started, and it did not fix it. That over-wrote the last System Restore point from before the updates (each uninstall writes a new one and Vista only keeps 15), so I couldn’t go back to that.

    After I discovered that the problem affected Standard users but not Admin users I was just about ready to start digging in with Process Monitor to see whether I could find what registry entries were involved. Your comment saved me a lot of work. (I really don’t know how to use Process Monitor that well yet, and would prefer not having to learn it.) Thank you so much for sharing your knowledge.

    And THANK YOU to Idea15 Web Design (who are you?) for the blog post. It steered me off of the wrong track of suspecting MS Windows updates onto looking for other culprits (Adobe Flash Player update, which I now suspect caused the problem.).

  12. ArcoZakus says:

    Bob Gerran (1 July 2010 at 19:43)

    Web users don’t get to pick whether websites we go to use jpg or png graphic files. Google uses a png for its main logo. Also to display Google Maps.

  13. ArcoZakus says:

    Sam Jarvis (20 August 2010 at 11:09)

    I could write a book about reasons I hate Microsoft. But in this case I think the blame goes to the developers of the applications causing the problems — Apple for QuickTime and Adobe for Flash Player, and who knows how many others.

    My past bad experiences led me to suspect the Windows updates I had installed just before noticing this problem as being the cause. Wasted a lot of my time chasing that idea.

    It turned out to be a permission in the registry being changed, which I suspect was done by an update to Flash Player. Not sure how Microsoft can fix that if someone else messes it up.

  14. Hello everyone,
    i too had same problem, i got the solution with the permission in key below.
    After of the procedure below, i dont had more problem.

    Insert everyone with read permission in key below.
    HKEY_CLASSES_ROOT\Mime\Database\Content Type

    My windows is xp with internet explorer 7.

    regards.

  15. KONNN says:

    >>> TOOLS/SOLVED>>>

    1.CREATE OR FIND A .PNG FILE AND

    RIGHT CLICK AND SELECT “OPEN-WITH”

    AND CHOOSE OR BROWSE TO ” PAINT”

    AND CHECK TO MAKE DEFAULT.

    WORKS FOR ALL FOR ALL INCLUDING .PNG

    2. OPEN UP EXPLORER AND GOTO TOOLS/INTERNET OPTIONS/ADVANCED (TAB)/ MULTI MEDIA/>>> PUT A CHECK MARK ON “SHOW PICTURES ” IF UNCHECKED.

    3. MAKE SURE JAVA IS INSTALLED BY GOING TO CONTROL PANEL IF COMPUTER IS NEWLY RE-FORMATED.

    NOTE THE FIRST STEP WILL FIX IT ALL TOGETHER AND THE OTHER STEPS IS JUST SYSTEM CHECKS……………AND AS FAR AS THE QUICK TIME THINGY……… IT’S NOT QUICKTIME THAT CAUSES THIS…..NOT IS GOING TO QUICKTIME-PREFERENCES A FIX………. IT’S WHEN THE ,PNG FILE WAS DEFAULT WAS CHANGED THAT FIXES IT.
    EXAMPLE: EXPLORER CAN’T OPEN .PNG FILES WITHOUT LINKING THE DEFAULT TO MICROSOFT PAINT………….DUMB I KNOW…………….BUT THATS WHY MOST IMAGES (.IMG, .JPG, ETC. ARE VIEWABLE BUT .PNG IS NOT.)

  16. Shabbeer says:

    Thanks, sorted my problem with outlook not being able to view messages that had an embedded .png file. Trying for months to resolve. Thanks again.

  17. Knizle Enoot says:

    Everything Microsoft is delicate. It also may, or may not, work depending on how virus scanners and other “security” programs have left it for you. For example, and for no apparent reason, Microsoft Media Player suddenly becomes unavailable. After weeks of messing around it was replaced with K Lite Media Player Classic. That works ALWAYS ! The same with Internet Explorer. It suddenly decided not to display PNG graphics. Again finding all offered solutions useless including those from Microsoft, Mozilla Firefox was tried. And that also always works without issues. It is strongly suggested that users not be afraid of trying reputable alternative programs. The reason that work from Microsoft is so delicate is because all their operating algorithms, routines and methods are based on much older versions, some going back to the beginning of DOS. They have spliced a lot of these together trying to make a whole and the end result is a total ‘lost in the details’ mess. That coupled with staff changes means that now at MS nobody really knows what they are doing. Final word is to try other offerings. Best of luck from Knizle Enoot

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s