Heap fragmentation on online_image since update

I have weird logs on my Waveshare E-Paper ESP32 Driver Board since update to 2025.2.2… previous version was probably around 2024.10…
It seems online_image can not find enough contiguous heap to decode the image after downloading it.

...
[08:45:48][D][sensor:094]: 'Heap Free': Sending state 113152.00000 B with 0 decimals of accuracy
[08:45:48][D][sensor:094]: 'Loop Time': Sending state 41.00000 ms with 0 decimals of accuracy
[08:45:48][D][sensor:094]: 'Heap Max Block': Sending state 61428.00000 B with 0 decimals of accuracy
[08:45:50][I][online_image:102]: Updating image http://10.0.1.36:5000/
[08:45:50][D][http_request.arduino:125]: Content-Length: 21177
[08:45:50][D][online_image:154]: Starting download
[08:45:50][D][online_image:171]: Allocating PNG decoder
[08:45:50][I][online_image:188]: Downloading image (Size: 21177)
[08:45:50][W][component:237]: Component interval took a long time for an operation (60 ms).
[08:45:50][W][component:238]: Components should block for at most 30 ms.
[08:45:50][D][online_image:082]: Allocating new buffer of 48000 bytes
[08:45:50][E][online_image:086]: allocation of 48000 bytes failed. Biggest block in heap: 7924 Bytes
[08:45:50][E][online_image.png:066]: Error decoding image: No IHDR chunk is found
[08:45:50][E][online_image:223]: Error when decoding image.
[08:45:50][D][main:136]: Could not download the image
[08:45:50][W][component:237]: Component online_image took a long time for an operation (52 ms).
[08:45:50][W][component:238]: Components should block for at most 30 ms.
[08:45:53][D][sensor:094]: 'Heap Free': Sending state 113152.00000 B with 0 decimals of accuracy
[08:45:53][D][sensor:094]: 'Loop Time': Sending state 159.00000 ms with 0 decimals of accuracy
[08:45:53][D][sensor:094]: 'Heap Max Block': Sending state 61428.00000 B with 0 decimals of accuracy
...

Right before and after the online_image execution there is clearly enough Heap Max Block (61kB), but the image decoder can’t find a block bigger than 7924 B in heap…

Here is the config :

esphome:
  name: big-e
  friendly_name: Big-E
  on_boot:
    then:
      - wait_until: api.connected
      - component.update: png_image

esp32:
  board: az-delivery-devkit-v4
  framework:
    type: arduino

http_request:
  verify_ssl: false

globals:
  - id: data_updated
    type: bool
    restore_value: no
    initial_value: 'false'
  - id: initial_data_received
    type: bool
    restore_value: no
    initial_value: 'false'
  - id: recorded_display_refresh
    type: int
    restore_value: yes
    initial_value: '0'

online_image:
  - url: "http://10.0.1.36:5000/"
    format: png
    id: png_image
    type: binary
    on_download_finished:
      - component.update: eink_display
    on_error:
      - logger.log: "Could not download the image"

interval:
 # - interval: 5min
  - interval: 1min
    then:
    - component.update: png_image

#image:
#  - file: mdi:alert-outline
#    id: alert
#    resize: 1x1
#    type: BINARY

debug:
  update_interval: 5s

sensor:
  - platform: debug
    free:
      name: "Heap Free"
    block:
      name: "Heap Max Block"
    loop_time:
      name: "Loop Time"

logger:
  level: debug

text_sensor:
  - platform: debug
    device:
      name: "Device Info"
    reset_reason:
      name: "Reset Reason"


api:
  encryption:
    key: "ZQSDL2RTmpyLDQSDFNKZE/XsY3I6vTTBhUntFgM="

ota:
  - platform: esphome
    password: "da76b0zzzddd454e21ca73427d8"

wifi:
  use_address: 10.0.30.141
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Pins for Waveshare ePaper ESP Board
spi:
  clk_pin: GPIO13
  mosi_pin: GPIO14


display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: GPIO15
    dc_pin: GPIO27
    busy_pin: GPIO25
    reset_pin: GPIO26
    reset_duration: 2ms
    model: 7.50in-bv2
    update_interval: never
    lambda: |-    
      it.image(0, 0, id(png_image), COLOR_OFF, COLOR_ON);


What you guys think I can do to help this situation ?

[EDIT] The 48000 bytes requested buffer size is right : the downloaded image is a 800x480px binary image, so 48kb