You can define a server resource pack in the server.properties.
See Default Resource Packs here: https://minecraft.fandom.com/wiki/Resource_Pack
This is downloaded "out-of-band" from the specified url
I don't think sending images directly from the server to the client is a good idea.
* It is outside the normal lifecycle of resource loading
* Doing so with custom login network packet(s) is going to slow down the login and potentially break the 30 second timeout for people with slow machines/networks
If you do want to do it, one way is to look at how skins and capes are handled in SkinManager.
But in general having a client make a random network connection is a bad idea, a potential security hole and a privacy issue.
When I see this kind of thing happening in modpacks, e.g. trying to connect to discord or the like, I generally just uninstall the mod or the whole mod pack.