esp32 server favicon
by referring this good thread https://forum.arduino.cc/t/webserver-serving-an-image-in-code/1010809/3 I was able to make image/png favicon working. however, I found that if I use binary array instead of using base64 converting, whole favicon.ico can be serviced. favicon.ico is actually bigger than esp32 free SRAM, that was the reason of crash, author also mentioned about the safe size. I realized that if I convert favicon.ico file to the binary using const char [] array, it will be loaded to flash only and does not spend SRAM. I used below python script for converting favicon.ico file to the const char [] array. ------------------------------------------------ if __name__ == "__main__": file_path = "favicon.ico" with open(file_path, "rb") as file: bytes_data = file.read() file.close() str = "const char favicon_binary[] = {" for byte in bytes_data: str += f"0x{byte:02X}, " str += "};"