When the jpeg library is /jpegLib/ { Wish the web server handles route {/camera-frame} with handler { set camera [dict getdef $QUERY camera /any/] ForEach! camera $camera has jpeg frame /jpeg/ at timestamp /any/ { set data [$jpegLib jpegData $jpeg] set fsize [string bytelength $data] break } if {![info exists data]} { error "camera-frame: No valid camera frame found (for $camera)" } dict create statusAndHeaders "HTTP/1.1 200 OK Connection: close Content-Type: image/jpeg Content-Length: $fsize\n\n" \ body $data } }