--- lightbox.js 2009-01-05 15:21:52.000000000 +0100 +++ lightbox.js.linksunten 2009-07-25 23:04:44.000000000 +0200 @@ -336,11 +336,23 @@ var Lightbox = { var rel_data = Lightbox.parseRel(anchor); var anchor_title = (rel_data["title"] ? rel_data["title"] : anchor.title); if (rel_data["rel"] == rel) { + + // Always try to load images in display size + // Else, imgNodeLoadingError() loads the images in original size + var s = Drupal.settings.lightbox2; + if (s.display_image_size !== "") { + var ii = anchor.href.lastIndexOf("."); + anchor.href = anchor.href.substr(0,ii+1) + s.display_image_size + anchor.href.substr(ii,anchor.href.length); + } + if (rel_data["group"] == rel_group) { if (Lightbox.isLightframe || Lightbox.isModal) { rel_style = rel_data["style"]; + Lightbox.imageArray.push([anchor.href, anchor_title, alt, rel_style]); + } + else { + Lightbox.imageArray.push([anchor.href, anchor_title, alt]); } - Lightbox.imageArray.push([anchor.href, anchor_title, alt, rel_style]); } } } @@ -893,6 +905,8 @@ var Lightbox = { else if (Lightbox.isVideo || Lightbox.isModal) { $('#modalContainer').hide().html(""); } + // Call auto image handling again when lightbox is closed + lightbox2_image_nodes(); },