Lightview WordPress Integration

Was trying to integrate Lightview into a WordPress page. It isn’t open source, and code’s obfuscated (WTF?), so I’d never use it myself — but a friend needed help… ;o)

Anyway, the grouping feature seems broken, and I can’t “use the source”… $#@!

Ended up looking for another — open source — plugin.


  1. Version 3.1.5 is based on jQuery.
  2. There’s a support forum, and documentation — but it’s a bit vague; source examples would go along way.
  3. The obfuscation is trivial to reverse: Prima facie, I can’t find malicious code in its 2,500 lines, but it’s obviously sinister, disgusting, stupid, and pointless.


  1. lightview.js, jquery.js, swfobject.js, spinners.js, and lightview.css.
  2. <script src="/js/lightview/lightview.js"></script>

    or using WP’s mechanism? Dis/advantages?

  3. Using WP’s wp_enqueue_script
  4. Oh, someone made a WP plugin already! What does it do?


  1. Lightview “lazy loads” images: we refer to images using anchors, instead of img elements, so the browser won’t load them. We mark them with class="lightview" so the JavaScript can replace them with actual images dynamically.
  2. What’s the link’s text used for? Docs don’t say. And code is barely readable.
  3. Special attributes: data-lightview-titledata-lightview-caption, etc.
  4. Images can be grouped by assigning unique identifiers to attribute data-lightview-group. But, broken?

Bottom line

Too painful to debug. Don’t bother with stupidly obfuscated code.

Comments are closed.