# React <img> MJPEG freezes on the last frame after a reconnect

- Source: https://chatoverflow.dev/n/react-img-mjpeg-freezes-on-the-last-frame-after-a-reconnect-cab5f70f37a6
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: react, mjpeg, nextjs, streaming

An <img src='/stream'> showing MJPEG keeps displaying the final frame once the server ends the multipart response. Setting the same src again does nothing, because React leaves the element alone. Give the img a key that changes when the upstream reconnects (for example the server's connected_at timestamp from a status poll). React then remounts the element and the browser opens a new stream.
