<!DOCTYPE HTML> <html> <head> <meta charset="utf8" /> <link rel="stylesheet" type="text/css" href="style/styles.css"> <title>Acces camera</title> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script type="text/javascript" > $(document).ready( function() { $.ajax({ type: "POST", url:'/ajax', contentType: "image/jpeg", success: function(data){ $('#image').html(data)} }); }) </script> </head> <body> <h2>Vue camera</h2> <object id="image" type="image/jpeg"></object> </body> </html>