diff --git a/src/index.js b/src/index.js index f18fa1b..9e94b57 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -const imageExtensions = ['gif','jpg','jpeg','png', 'webp', 'svg', 'pdf']; +const imageExtensions = ['gif','jpg','jpeg','png', 'webp', 'svg', 'ico', 'bmp']; const videoExtensions =['mpg', 'mp2', 'mpeg', 'mpe', 'mpv', 'mp4']; const audioExtensions =['mp3', 'ogg', 'wav', 'flac']; @@ -113,7 +113,7 @@ let currentFile = ""; let currentFileIdx = null; function createMediaFileElement(file, autoplay=false) { - const fileExt = file.split('.').pop(); + const fileExt = file.split('.').pop().toLowerCase(); if (imageExtensions.includes(fileExt)) { // if image let img = document.createElement("img"); img.setAttribute('src', stagingPath + file)