I've tried various online tools, with .bmp .png and last .ico files, converting to "C array".
The source files are ex photoshop, 16x16 pixel. Yes the last one I posted was bigger but that was just so you could see it in the post. The actual image is 16x16 pixels.
There is a lot of conflicting info on acceptable formats.
I am now using this 256-byte one, converted with
https://lvgl.io/tools/imageconverterstatic const unsigned char FAVICON_HEADER[] =
"HTTP/1.1 200 OK\r\n"
"Content-Type: image/x-icon\r\n"
"Content-Length: 256\r\n";
static const unsigned char FAVICON_BODY[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x20, 0x20, 0x20, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0x20, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x20, 0x20, 0x20, 0xff, 0xff, 0xff, 0xff, 0x20, 0x20, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};
which in Edge produces this in the debug console

and the header and the file are 66 and 256 bytes which comes to 322 so that's ok. I've checked the length value passed here
netconn_write(conn, FAVICON_HEADER, strlen((char*)FAVICON_HEADER), NETCONN_COPY);
netconn_write(conn, FAVICON_BODY, sizeof(FAVICON_BODY), NETCONN_COPY);
Chrome and Edge show nothing (if going to the direct URL) while FF says the image contains errors. I can't see any way to display the actual binary data coming back to the browser, and I don't have an ethernet protocol analyser.
I did try your file, with
0x5089, 0x474e, 0x0a0d, 0x0a1a, 0x0000, 0x0d00, 0x4849, 0x5244,
0x0000, 0x1000, 0x0000, 0x1000, 0x0301, 0x0000, 0x2500, 0x6d3d,
0x0022, 0x0000, 0x5006, 0x544c, 0xff45, 0xffff, 0x0000, 0x5500,
0xd3c2, 0x007e, 0x0000, 0x4925, 0x4144, 0x0854, 0x63d7, 0x0380,
0x0f99, 0x1c0c, 0x0c0e, 0x0d1c, 0x9c0c, 0x0c0c, 0x0c5c, 0xbc0c,
0x400c, 0x5836, 0x8144, 0xc641, 0xae00, 0x000a, 0x2058, 0x4103,
0xb764, 0x72b3, 0x0000, 0x0000, 0x4549, 0x444e, 0x42ae, 0x8260
};
but it completely breaks it. I declared the array as uint16_t because I can see e.g. 0x0a0d which is LFCR i.e. backwards but the 32F4 is little-endian so it should work.
If someone would be kind enough and generate an icon file C array which just displays the letter K (in Courier, fwiw) I will give it a go but otherwise I will have to abandon this, after 2 days. It is very easy on a normal web server but clearly there is some special trick involved when one is dealing with "actual bytes".
At the same time I am returning a printable-data web page without any trouble, so maybe base64 encoding would be better. OTOH I don't know if my icon file is even right...
I've been looking for somebody, as a paid consultant, who can help with this kind of thing but haven't found anyone. There is a Monday-only guy working on this project (he did the original Cube setup and later worked on the ethernet end of it) and he knows all this, but today is Tuesday

So I need to solve these things on my own. I can do most things in embedded but by choice never went up the learning curve on ETH, USB, TCP etc, PHP, server-side coding and config. I do have a good guy for the server stuff and he is doing some embedded C now (setting up an embedded HTTP server on this product) but I think this favicon issue is something really simple.