var minImageWidth1 = 300, minImageHeight1 = 200; Dropzone.options.myDropzone1 = { acceptedFiles: "image/*", addRemoveLinks: true, accept: function(file, done) { console.log("uploaded"); done(); }, init: function() { this.on("processing", function(file) { this.options.url = base_url+"welcome/addfoto"; }); this.on("addedfile", function() { if (this.files[1]!=null){ this.removeFile(this.files[0]); } }); this.on("thumbnail", function(file) { if (file.width < minImageWidth1 || file.height < minImageHeight1) { file.rejectDimensions() } else { file.acceptDimensions(); } }); }, accept: function(file, done) { file.acceptDimensions = done; file.rejectDimensions = function() { done("Ukuran Sesuai kan"); }; } };