Problem: I have an image on the desktop or some other folder and I cannot view it or open it. It does not matter if I double click on the icon or right click and select preview or "open with" and "Windows Photo Gallery". It doesn't matter if it is a jpg, bmp, png, gif or some other image file format I'm still unable to open the image. If I right click and edit the file it opens up in my image editor. File association works as I can open pictures in other locations. The problem is the same if I have a shortcut to an image. I have Windows Vista SP1 installed.
Solution: If any Internet shortcut has an URL with 260 characters or more you will find that you cannot open any picture file in that folder with Windows Photo Gallery. Right click on any shortcut and on the Web Document tab you find the URL. When you delete or move this shortcut to another folder it will work again. If you have hard to find the shortcut or shortcuts you can create a folder and move half of the shortcuts to that folder and then try to double click on the image again and that way isolate the problem.
Another tip that probably is the easiest one is to open Windows Explorer (press ÿ+E) and right click on any column header, click on "More..." and in the Choose Details dialog box check URL. Make the width of the column URL large so you easily can identify the long ones.
Notice the first Internet Shortcut's URL in the image below,
There is obviously a bug in Windows Photo Gallery and an alternative solution is to change the default application for viewing your photos.
Why does this happen? You browse the Internet and find a website, make a shortcut of it and place it on the desktop. It can be for "Google Image Result" after searching for some pics or something else. These links have often URLs with more than 259 characters. You can reproduce this by for example visiting this link (with 309 characters) and create a shortcut on the desktop: http://images.google.com/imgres?imgurl=http://www.jtbworld.com/images/AutoCAD2007.png&imgrefurl=http://blog.jtbworld.com/2006_03_01_archive.html&h=586&w=811&sz=137&hl=en&start=2&um=1&tbnid=7EDzAAGQIGA_sM:&tbnh=104&tbnw=144&prev=/images%3Fq%3Dautocad%2Bsite:jtbworld.com%26as_st%3Dy%26um%3D1%26hl%3Den%26sa%3DG