update lightbox to load resource if necessary