How can Bootstrap fileinput only preview images?

at present, the project uses bootstrap fileinput to upload images, but when it encounters txt or other document formats, it has a very friendly preview of the contents, but the Chinese support is not very good. I want to only preview images, other formats are not previewed, and there are only icons like thumbnails. How to set it up?


has been solved, allowedPreviewTypes: ['image']


I'm going to do it, too.


landlord, how do you solve this problem, I just want to preview the picture, other formats do not preview, I have added your sentence, but it does not take effect, or other formats of files can be previewed, including compressed files, annoying skin;

Menu