use the API in batches. You can retrieve the information (including
thumbnail URL) for 500 files in a single request (5000 if you get a bot flag):
Its actually 50 and 500 with bot flag. Unless the api docs aren't up to date and this was changed since the last time I tried (a few months ago) Daniel