🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

jpreview is a really small jQuery plugin which allows you to preview images before uploading. Supports single or multiple file input.

file-input Image-Preview

Documentation

jPreview Plugin

Jquery plugin preview image before upload

Installation:

  • Install via composer: composer require buivannguyen/jpreview
  • Add link to jpreview javascript and css file
<link rel="stylesheet" type="text/css" href="jpreview.css"> <script src="path/to/jquery.min.js"></script> <script type="text/javascript" src="path/to/jpreview.js"></script> 

Usage:

$(document).ready(function(){     $('.selector').jPreview(); }); 

And HTML markup:

<input type="file" name="test1" class="demo" data-jpreview-container="#demo-1-container"> <div id="demo-1-container" class="jpreview-container"></div> 

You May Also Like