Skip to main content

ocsigen img tag

Goal

I want an IMG tag

Recipe

 open Lwt open XHTML.M open Eliom_services open Eliom_parameters open Eliom_sessions open Eliom_predefmod.Xhtml   let main_handler sp () () =     Lwt.return       (html          (head (title (pcdata "ttt")) [] )          (body [ (div [img ~alt:"Ocsigen" ~src:(make_uri ~service:(static_dir sp) ~sp:sp ["logo.gif"]) ()]) ;                   (div [pcdata "blabla"])])   let main_service =   Eliom_predefmod.Xhtml.register_new_service     ~path: [""]     ~get_params: Eliom_parameters.unit     main_handler 
Of course, we need static directory. to be setup in the "ocsigen.conf" file