code: def get_image_dir(img_dir):
      
      current_wall = wallpaper.get()
      current_wall = os.path.basename(current_wall)
  
      file_types = (".png", ".jpg", ".jpeg", ".jpe", ".gif")
  
      return [img.name for img in os.scandir(img_dir)
              if img.name.lower().endswith(file_types)], current_wall
docs: Get all images in a directory.