Format detection fix (#238)

* better format detection

* version
This commit is contained in:
Jeffrey Warren
2018-05-03 16:35:02 -04:00
committed by GitHub
parent 8547c60873
commit 39418da187
4 changed files with 6 additions and 4 deletions

View File

@@ -12,7 +12,8 @@ function ReplaceImage(ref,selector,steps,options) {
function replaceImage (img, steps) {
var url = img.src;
var ext = url.split('.').pop();
// refactor to filetypeFromUrl()
var ext = url.split('?')[0].split('.').pop();
var xmlHTTP = new XMLHttpRequest();
xmlHTTP.open('GET', url, true);