Image is not shown from mongodb in ejs template
<p>I am trying to insert an image in mongodb, then I want to fetch and show the image in ejs template.</p>

<p>My code:</p>

<p><strong>index.js</strong></p>

<pre><code>var uploadDir=__dirname+'/uploads';
 var images=Date.now()+'.jpg';
var storage=multer.diskStorage({
    destination:function(request, file, callback){
        callback(null, uploadDir);
        },
        filename:function(request, file, callback){
            console.log(file);
            callback(null, images);
            }
    });
    var upload=multer({storage:storage}).single('photo');

/*============== blog Insert============*/
router.post('/add', upload, function(req, res, next){
    new blogs({
        title: req.body.title,
        description:req.body.description,
        categories:req.body.category,
        img:images,
        date:Date.now()
        }).save(function(err, doc){
             res.send('Inserted');
        });
    });
</code></pre>

<p>the Image is successfully inserted into collection as name of file and also storing in disk space. 
When I try to fetch the image by writing: </p>

<pre><code>&lt;img src="./routes/uploads/&lt;%= blogdata.img%&gt;" /&gt;
</code></pre>

<p>in my view page the image is absent. I turn to the viewsouce code of that page and its showing the full path i.e</p>

<pre><code>&lt;img src="./routes/uploads/1459772396796.jpg"&gt;
</code></pre>