Just learned why https://jamesvandyne.com/favicon.ico does not work ... It’s an SVG!
With an emoji inside it! That explains why the final PNG (I’m converting all of these to PNG, by the way) shows the “weird byte sequence” block thingy. Don’t think I can get Imagick (or my install) to support emoji, so I might just have to detect SVG files and keep them as is. (Possible security issues, though ... Might just drop SVGs instead.)
Note to self: https://github.com/darylldoyle/svg-sanitizer
Used DuckDuckGo’s favicon service as per https://ohdear.app/blog/how-we-added-a-favicons-to-our-site-list. Did not, however, use the Spatie Media Library.
The biggest pain? Detecting whether we’ve got an ICO (which Imagick, it seems, isn’t particularly fond of) or something else (PNG, usually), and then extracting the (preferably) 32×32 “frame.”