Fileinput with or without image view. Automatically change input file into Jasny Bootstrap Fileinput which is an extension to vanilla Bootsrap 3. See example index.html.
include all depandencies and init like this:
$('input[type=file]').fileinputAuto();
include all depandencies and init like this:
<input type="file" data-fia-auto="true">
$('input[type=file]').fileinputAuto({
btnSelect: "Select image",
btnRemove: "Remove",
btnChange: "Change",
thumbnail: false, // enable image preview, if false options below are omitted
width: 300,
height: 300,
defaultImage: '', // myimage.jpg, if is given options below are omitted
fakeimg: false, // fake image -> http://fakeimg.pl
message: 'No image' // text shown in thumbnail
});
<input type="file"
data-fia-auto="true"
data-fia-select="Select image"
data-fia-remove="Remove"
data-fia-change="Change"
data-fia-thumbnail="true"
data-fia-width="300"
data-fia-height="300"
data-fia-image=""
data-fia-fakeimg="false"
data-fia-message="No image">