var minImageWidth = 800, minImageHeight = 600; Dropzone.options.graphicDropzone = { maxFilesize: 3, maxFiles: 3, addRemoveLinks: true, acceptedFiles: ".psd, .ai, .jpg, .jpeg, .gif, .png", init: function() { this.on("success", function(file, responseText) { file.previewTemplate.setAttribute('id',responseText[0].id); }); this.on("thumbnail", function(file) { if (file.width < minImageWidth || file.height < minImageHeight) { file.rejectDimensions() } else { file.acceptDimensions(); } }); }, accept: function(file, done) { file.acceptDimensions = done; file.rejectDimensions = function() { done("Image too small."); }; } };