diff --git a/capture/genBitmaps.js b/capture/genBitmaps.js
index <HASH>..<HASH> 100644
--- a/capture/genBitmaps.js
+++ b/capture/genBitmaps.js
@@ -123,6 +123,10 @@ function processScenario (casper, scenario, scenarioOrVariantLabel, scenarioLabe
 
   casper.each(viewports, function (casper, vp, viewportIndex) {
     this.then(function () {
+      var onBeforeScript = scenario.onBeforeScript || config.onBeforeScript;
+      if (onBeforeScript) {
+        require(getScriptPath(onBeforeScript))(casper, scenario, vp, isReference);
+      }
       this.viewport(vp.width || vp.viewport.width, vp.height || vp.viewport.height);
     });
 
@@ -131,11 +135,6 @@ function processScenario (casper, scenario, scenarioOrVariantLabel, scenarioLabe
       url = scenario.referenceUrl;
     }
 
-    var onBeforeScript = scenario.onBeforeScript || config.onBeforeScript;
-    if (onBeforeScript) {
-      require(getScriptPath(onBeforeScript))(casper, scenario, vp, isReference);
-    }
-
     this.thenOpen(url, function () {
       casper.waitFor(
         function () { // test
Add cookies to bitmaps after each scenario has run (#<I>)

This is awesome -- thanks Shane!!!