I\'m trying to display images already stored on the server. I display in dropzone, using the following code:
myDropzone.emit(\"addedfile\", mockFile);
myDrop
I am recommending you create thumbnails on the server, because otherwise your users need to download all images in their original size, just to view small thumbnails.
That being said, if you still want to go ahead, and download the originals and resize in the browser, I just released Dropzone v4.0.1 to include the function createThumbnailFromUrl()
.
Use it like this:
myDropzone.emit("addedfile", mockFile);
myDropzone.createThumbnailFromUrl(mockFile, '/your-image.jpg');
(Side note: the image needs to be hosted on the same server, otherwise you'll get a Cross-Origin error)