Avoid infinite loop in getImageNamesScraper