indexpreview.js is a Javascript utility to add rudimentary image previewing to Apache directory listings. When you hover the mouse over the name of an image, a preview of it will be displayed to the right.

I wrote it to improve the usability of the HTTP view of the directory my scanner drops files into.


1. Install indexpreview.js in your document root. (If you don’t put it at the root then you’ll have to adapt the configuration below accordingly.)

2. Insert this at an appropriate point in your Apache configuration or .htaccess file:

IndexHeadInsert "<script src=\"\"></script><script src=\"/indexpreview.js\"></script>"

3. Reload your Apache server, if you modified its global configuration..

If you already have a local copy of jQuery, you can use that rather than the CDN version.

RJK | Contents