Fork of @kitzy's post-imaging script