merging turn off image fix and consequent broken gallery image fix to staging

also has working tests