Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By martinayotte
#29243 You can use PROGMEM, but beware that PROGMEM can't be used with println() function directly, you need to use it with functions such ESP8266WebServer::send_P() or ESP8266WebServer::sendContent_P() or write your own wrapper that will use memccpy_P().
There is a pending PR that needs to be merge by IGRR whichi will provide WifiClient::write_P().
In the mean time, you can grab this change from the PR https://github.com/esp8266/Arduino/pull/753 .
User avatar
By ustredna
#30096 Hi, i'm beginer,
can you felp me , i need find example code for show image on my esp web server with used ESP8266WebServer::sendContent_P() function.

can you send me any sample code . my image is codec onto base64 code. how insert image into my page.

tnx.
Peter
User avatar
By ReNNo_BiH
#30173 Just try HelloServer example and you can display image like this:
Code: Select all  server.sendContent_P(logo, sizeof(logo) );


You also need to store image in flash memory like this:

Code: Select allconst char logo[] PROGMEM = R"=====(<img class="center fit" src="data:image/png;base64,iVBORw0KGgoAAAANSU"/>)=====";


Repalace "iVBORw0KGgoAAAANSU" with your base64 data.