>>945867>don't know if there's a better way or not.There's no benefit to using an ICO unless you're going to produce the various sizes by hand. The whole point of an ICO is you can provide completely different images for each size, which means you can hand-optimise for each size, perhaps by cutting unimportant regions, or going from isometric to head-on.
If you're just going to mechanically scale it, serve a PNG (or a WEBP) and the browser will do that for you.
https://docs.microsoft.com/en-us/windows/win32/uxguide/vis-icons