[Vuejs]-Vue-dropzone doesn't generate thumbnails on file add

5👍

You can manually add thumbnail with emit:

this.product.images.forEach(image => {
      const file = { name: 'Icon', type: 'image/jpeg', dataURL: image };
      this.$refs.dropzone.manuallyAddFile(file, image);
      this.$refs.dropzone.dropzone.emit('thumbnail', file, file.dataURL)
      this.$refs.dropzone.dropzone.emit('complete', file)
    });

If your ref is dropzone you need to go to this.$refs.dropzone.dropzone.

And you need to call your method in @vdropzone-mounted="loadPictures".

Good luck!

👤mare96

Leave a comment