preparing for image insertion