Lightbox 2 WordPress Plugin
WordPress plugin used to overlay images on the current page into neat Javascript-powered overlay popups.
16-12-2008 – Version 2 is out! Now from settings you can choose background-color, overlay opacity, resize speed and automatically add the lightbox effect to your post’s images.
This plugin includes the new Lightbox JS v2.0.4 javascript written by Lokesh Dhakar and and was then transformed into a WordPress Plugin by me. Use a title attribute if you want to show a caption. Click on the images below for an example.
- 29-07-2007 – See also the new Slimbox WordPress Plugin, a 7kb clone of the popular Lightbox JS
- I added the digg it button, please DIGG ME!
Upgrade
- De-activate the plugin.
- Delete the old version `lightbox-2-wordpress-plugin` directory.
Installation
- Unzip the `lightbox-2-wordpress-plugin.zip` file.
- Upload lightbox-2-wordpress-plugin folder to the /wp-content/plugins/ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress, go to Setting->Lightbox.
- Add a rel=”lightbox” attribute to any link tag to activate the lightbox, or rel=”lightbox[roadtrip]“ for an image set.
- Optional: Use a
titleattribute if you want to show a caption.
Single example:
<a href=”img1.jpg” rel=”lightbox” title=”my caption”>thumbnail1</a>
Image set example:
<a href=”img1.jpg” rel=”lightbox[roadtrip]“>thumbnail1</a>
<a href=”img2.jpg” rel=”lightbox[roadtrip]“>thumbnail2</a>
<a href=”img3.jpg” rel=”lightbox[roadtrip]“>thumbnail3</a>
Tnx to my sister for the photos! Link me in your site!
Changelog
Version 2.0.2 (19-12-2008)
Some fixes
Version 2.0 (16-12-2008)
Background-color, overlay opacity, resize speed, auto-lightbox from settings.
Version 1.8.2 (09-06-2008)
Some fixes
Version 1.8 (14-03-2008)
Update Lightbox Js to version 2.04
- v2.04 – 03/09/08
- NEW – Upgraded Prototype from v1.4 to v1.6.0.2
- NEW – Moved label text into configuration for easier localization
- UPDATED – Code cleaned up. Respect for the global namespace and native javascript objects.
- FIXED – Caption displays as “null” when viewing an uncaptioned image after viewing a captioned image.
- FIXED – Clicking ‘close’ button shifts layout as link focus’ dotted line appears.
Version 1.7 (12-06-2007)
Update Lightbox Js to version 2.03.3
- v2.03.3 – 5/21/07 – Support for horizontally scrolling pages. Added updateImageList method for ajax’y pages.
Fixed xhtml validation
Version 1.6 (05-05-2007)
Update Lightbox Js to version 2.03.2
- v2.03.2 – 4/30/07 – Fixed animated gif support in IE/Opera.
- v2.03.1 – 4/18/07 – Fixed embed hiding. Overlay opacity var added to config. Image sets w/Imagemaps fix. Clearfix removed.
- v2.03 – 4/10/07 – Improved keyboard navigation. Animation off toggle. HidesFlash movies under overlay. Imagemap support. Valid CSS.
Fixed close and loading vars (Tnx to Anton Zhuchkov)
Changed “get_settings(‘home’)” in “get_option(‘siteurl’)”
(Tnx to Luca Dentella)
Version 1.5 (06-05-2006)
Fixed close and loading vars.(see here if u have problem with close button)
Version 1.4
Fixed path’s problem
Update Lightbox Js to version 2.0.2
Centering in IE6 (any DOCTYPE) fixed.
Smoothed out resize transition.
Fixed layout issues caused by multiline captions.
Added keyboard navigation: N for next, P for previous and X for close.
Version 0.3
Single Images and Image Set
My plugin on wordpress page suddenly stopped working. I wrote several email to them but nothing…

If you appreciate this plugin or my support, please donate to me so I can but a cup of coffee. Thank you!

Thanks to the donors:
- Per T Sovik
- Hoa Hua
- Spencer Harris
- Jan Herrmann
- Niels Emmer
- Sahar Alarayedh
Peppe does this plugin work with Safari? I have it loaded on two blogs and the images do not load in Safari.
Any help would be much appreciated.
Cheers!
Hi Craig, if u open this page with safari, can u see lightbox effect?
Hello! How to fixed all images link as rel=”lightbox” without adding this rel to all posts in my blog?
I tried editing file ‘wp-admin/upload-js.php’ for fixed link tag as rel=”lightbox” and upload-js.php not working as this changes.
Hi Ruslan, open lightbox2.php, uncomment lines 22-24 (the function lightbox_create).
Hi Peppe! I tried uncomment lines and this not replace my links in posts! More ideas?
Hi.
I am testing your plug-in on blog that i am currently setting up. Installation went smoothly and images are running, but have one small problem. When you click on image, the animated round icon (displayed when pre loading) is displayed all the time, doesn’t disappear even when whole image is loaded. You can see it here:
http://www.tomronda.com/blog/?p=1#more-1
Any idea why? I didn’t make any changes to lightbox files, and its happening in IE, FF and Safari.
[...] and saw pictures of Kiera Knightley playing peek-a-boo, fret not, I was testing a new plugin called Lightbox 2.0. Didn’t work at first, but then viola! It work fantastically and I luuurrrve [...]
[...] zu oeffnen gibt’s gescriptetes Zoom. Sehr nett anzusehen. Erforderlich ist zunaechst das Lightboxplugin fuer WordPress. Da 90% meiner Postings allerdings ueber Mail mit Postie von mir eingestellt werden [...]
[...] non interessa a nessuno, ma oggi festeggio le oltre 100mila visite al Lightbox 2 WordPress Plugin, pi
[...] 影完沖菲林scan菲林,post上forum同blog,順便一試剛嵌入的lightbox plugin, 雖然setting係煩0左少少,但係總算做到自己想要的效果… [...]
[...] Enlarger – IImage Panorama – Image Headlines – Lightbox 2 – Multi-Topic Icon – Random Image – Transparent PNG Fix – WP [...]
[...] Slimbox was designed to be 100% compatible with Lightbox, you can just replace the Lightbox 2 WordPress Plugin whit Slimbox Plugin and your Lightbox effects will work just as well as before. Use the title [...]
[...] download it and find out how to install it and even how to use it with a multiple image set at the Lightbox2 WordPress Plugin Page. This entry is filed under WordPress. You can follow any responses to this entry through the RSS [...]
[...] WP związane z otwieraniem miniatur: Lightbox2 – otwiera powiększenie miniatury na dodatkowej warstwie Enlarger – powiększa miniatury w ramach [...]
Hi there,
I have tried Simplebox and found out that it flickers and stuff like that when scrolling with a picuter open, and even when the picuter loads. I understand that this is because it is slimmer. But what different does it make to use Lightbox 2 instead? Will it get THAT musch slower with older computers and/or is there other negative effects that may occur? Will the scripts in either simplebox or lightbox 2 slow down the general load of my page?
Looking forward to answers.
–
Micke
Hmm. This LIghtbox 2 plugin. It does not make all earlier img tags on my site to open the lightbox way? I have to add the “rel” to all old images? :/
[...] This plugin includes the new Lightbox JS v2.03.2 javascript written by Lokesh Dhakar and got transformed into a WordPress Plugin by me. Plugin used to overlay images on the current page into neat Javascript-powered overlay popups. This plugin includes the new Lightbox JS v2.03.2 javascript written by Lokesh Dhakar and got transformed into a WordPress Plugin by me. Use the title attribute if you want to show a caption. Plugin Homepage [...]
[...] New : Lightbox 2, een nieuwe plugin die voor het albekende Lightbox effect zorgt. De vorige plugin, die ik daarvoor [...]
Moolto bello ma gli editor del nostro blog non sono in grado di editare il codice e di inserire i paramteri a mano. Sarebbe veramente stupendo se si potesse aggiungere all’atto del caricamento o dell’invio dell’immagine all’editor una opzione per attivare LightBox.
Comunque complimenti.
ti riscrivo, senti, sai aiutarmi? non capisco perch
Ciao, eccomi, in questi giorni sto poco al pc, comunque ho provato il tuo sito, praticamente vorresti il lighbox quando si visualizzano tutte le immagini e non solo dopo che ci clicchi? Veramente non so come funziona la lazyest, dovresti modificare il plugin in modo che aggiunga ad ogni foto il rel=”lightbox”, domani con calma lo guardo meglio, ciao.
Mikeal:
This is good BUT it nees IMPROVMENTS, if one have to wait for the page to LOAD then click on an image at only then the image would use the effect… well I don’t see the point in it. Re-write so whenever an img is clicket IT LOADS the image and not just opend in the same window as an image herf with _self taged.
Fix it and it will be the greates ever made, dont and then one can use a pop-up script with WAY more less files and adjustments.
oz:
Is there a way to use this for flash/quick time videos… I’ve been searching for lightbox mod to help me with videos but can’t seem to find any
[...] Lightbox 2 WordPress Plugin » 4MJ – Internet News [...]
[...] Traq – 生成博客的统计信息,以图形显示。 Sociable – 添加漂亮的网摘按钮。 LightBox 2 – [...]
[...] Lightbox 2: Öffnet eingefügte Bilder in einem Ajax-Layer über der Seite. [...]
Anne:
Great plugin that works well on my site. Thank you!
[...] Lightbox JS – Esse eu gosto! O efeito que causa
[...] v2. Because Slimbox was designed to be 100% compatible with Lightbox, you can just replace the Lightbox 2 WordPress Plugin whit Slimbox Plugin and your Lightbox effects will work just as well as before. Use the title [...]
I can’t get the popup to work properly. I have an image path but the plug-in doesn’t find it. I’ll buy you coffee if I can get it to work!
I tested it, http://www.metzlersfoodandbeverage.com/wineclub/group1.jpg file not found, where u put the file?
[...] Lightbox 2 (5/48) . Have you seen a neat trick on some websites, where you press on the image, the whole page dims into the background and the active window or image pops-up to the front? If you don’t know what I’m talking about, just head to the plugin page and press on the images there. If you want such a trick on your blog, install the plugin. [...]
[...] was from the Mashable post that I found the Lightbox 2 WordPress Widget. I have been using Lightbox 2 on geographyalltheway for a month or so now, so was very happy to [...]
[...] Lightbox 2 [...]
Ciao peppe
dimenticavo… la pagina di prova
Ciao Diego, non c’
[...] Lightbox 2 WordPress Plugin » 4MJ – Internet News [...]
[...] (that means I asked at #Mapcore) and some random asshat gave me a google link and the first hit was this. So now I’ve uploaded it and I have to test [...]
[...] effective graphical format. Sociable – adds all those cute tiny icons for easy social bookmarking LightBox 2 – A fade effect that you see on a myriad of blogs you visit these days where you click the image, [...]
[...] just installed the Lightbox 2 WordPress Plugin…. it’s a great (free) tool for displaying images on your site…. what a great [...]
Thanx for the plugin, works great! And yours sis sample pictures are great!
Fantastic plugin. I was going to code something like this myself but figured I’d see what was out there first. Love it, and works very well for displaying images in sets in my portfolio, as I want the attention to be on my photos – not the website. =)
Thanks for this awesome plugin, it really looks and works great!
[...] Sitenizdeki resimlerin Lightbox efekti ile gösterimini sağlar. Link [...]
[...] thumbnail viewer aku test. Semuanya bermasalah dengan theme yang aku guna ni. So akhirnya jumpa lah Lightbox 2 yang di modified dari Lightbox JS v2.2 javascript yang di tulis oleh Lokesh Dhakar. So far OK tapi [...]
Nadia:
I’d like to know if using Firefox the user can’t use the save as option. Because i’m using firefox and i can’t save the picture
Anyone here have an idea of how to enable this function?
[...] Sitenizdeki resimlerin Lightbox efekti ile gösterimini sağlar.Link [...]
















Aypeus:
Peppe you are my hero!
THANKS alot for the help m8!