What this does

Game image resizer finds and downloads the best image for a list of board games from BoardGameGeek using its API. Then it makes the images square with transparent padding around rectangular images. Then it saves them with a useful, upload-ready filename.

An image of 200px by 700px will turn out as 500px by 500px. And image of 200px by 400px will turn out as 400px by 400px. Transparent padding is added to retain the original aspect ratio.

Board Game Geek's API rate limiting is strict so this makes a request every 5 seconds. This means it's slow.

If you make heavy use of BoardGameGeek's API, images and image hosting using this script or otherwise, it would be nice to donate to them.