premage.js
jQuery plugin for having live preview of selected image from file browser (input[type=file]).
- Easily configurable.
- Provide default image to be displayed as place holder.
- Animations while changing the image.
- Display image in different shapes.
- Works in all major browsers.
- MIT License.
Usage
/* Here imgLive is the id of input having type=file. */
$("#imglive").livePreview({
width:'64px',
height:'64px',
shape: {
type: 'round'
}
});
More examples can be found here.
Dependency
Requires jQuery and jQuery UI.
Limitations
Only works for selecting image, if you are planing to select other files and than this will fail.
Config Options
Wiki page for Configuration Options.
Extras
Version: 1.0
Author: Harsh Raval
Created on: 11 Feb 2014
To get more details about it call the function with some random id and it will return you the details.
var a = $("#noMeaningOfThisId").premage();
console.log(a);