Background image insert logic added