Modified function to call img.overlay.