do image mangling outside of the main transaction so locks are not held