replace custom search with dict in gif optimize