Works well. Had to supply a user agent string to work around some hosts replying with a 403 Forbidden, and work around an oversight in the original code regarding HTTP status codes (`fopen` and friends follow redirects, which is _good_, but also means you may very well encounter valid image data in combination with a[n initial] 302). And added a sort of resizing option, which leads down a quite different path, and stores the outcome to disk.
And another one. Image URLs that end in a trailing slash—yes, those exist—now work as well.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!