Search code examples
javascriptjqueryimagelightboxlightbox2

How to display binary image data in lightbox


I am using Lightbox 2 plugin to display lightbox images (http://lokeshdhakar.com/projects/lightbox2/). It works fine, but now my images are all stored as an array of bytes. How can I change this plugin (or maybe use another plugin) to display binary image data rather than a path to an image?


Solution

  • I fixed it by creating a custom Image.ashx handler in my ASP.NET MVC app that processes images.