prepare image script