You need to produce an HTML IMG tag for the image and provide the right contents. One way is to put the image source in the web page directly as a data uri source:
#lang web-server/insta
(require pict
net/base64
file/convertible)
;; pict->data-uri : Pict -> String
(define (pict->data-uri pict)
(format "data:image/png;base64,~a"
(base64-encode (convert pict 'png-bytes))))
;; start : Request -> Response
(define (start request)
(send/suspend/dispatch
(lambda (make-url)
(response/xexpr
`(html
(body
(p "hello, here's a circle:")
(img ([src ,(pict->data-uri (circle 10))]))))))))
Another way is to make the image source a url that will send the image as its response:
#lang web-server/insta
(require pict
file/convertible)
;; pict-response : Pict -> Response
(define (pict-response pict)
(response/full 200 #"Ok"
(current-seconds) #"image/png"
(list)
(list (convert pict 'png-bytes))))
;; start : Request -> Response
(define (start request)
(send/suspend/dispatch
(lambda (make-url)
(response/xexpr
`(html
(body
(p "hello, here's a circle:")
(img ([src ,(make-url
(lambda (req)
(pict-response (circle 10))))]))))))))