Showing
4 changed files
with
4 additions
and
4 deletions
| @@ -1930,7 +1930,7 @@ jQuery(document).ready(function(){ | @@ -1930,7 +1930,7 @@ jQuery(document).ready(function(){ | ||
| 1930 | 1930 | ||
| 1931 | 1931 | ||
| 1932 | // DRAG and DROP file | 1932 | // DRAG and DROP file |
| 1933 | - var available_file_type = ['image/jpeg', 'image/pjpeg', 'image/png', 'image/gif']; | 1933 | + var available_file_type = ['image/jpeg', 'image/pjpeg', 'image/png', 'image/gif', 'image/webp']; |
| 1934 | 1934 | ||
| 1935 | var initImageDragDrop = function(){ | 1935 | var initImageDragDrop = function(){ |
| 1936 | $('.drop-down-upload').each(function(){ | 1936 | $('.drop-down-upload').each(function(){ |
| @@ -466,7 +466,7 @@ | @@ -466,7 +466,7 @@ | ||
| 466 | }; | 466 | }; |
| 467 | defaultFileTypeSettings = { | 467 | defaultFileTypeSettings = { |
| 468 | image: function (vType, vName) { | 468 | image: function (vType, vName) { |
| 469 | - return compare(vType, 'image.*') || compare(vName, /\.(gif|png|jpe?g)$/i); | 469 | + return compare(vType, 'image.*') || compare(vName, /\.(webp|gif|png|jpe?g)$/i); |
| 470 | }, | 470 | }, |
| 471 | html: function (vType, vName) { | 471 | html: function (vType, vName) { |
| 472 | return compare(vType, 'text/html') || compare(vName, /\.(htm|html)$/i); | 472 | return compare(vType, 'text/html') || compare(vName, /\.(htm|html)$/i); |
| @@ -25,7 +25,7 @@ module Kanjai | @@ -25,7 +25,7 @@ module Kanjai | ||
| 25 | 25 | ||
| 26 | def self.image?(url) | 26 | def self.image?(url) |
| 27 | ext = File.extname(url) | 27 | ext = File.extname(url) |
| 28 | - ['.jpg', '.gif', '.jpeg', '.png', '.svg'].include?(ext) | 28 | + ['.jpg', '.gif', '.jpeg', '.png', '.svg', '.webp'].include?(ext) |
| 29 | end | 29 | end |
| 30 | 30 | ||
| 31 | end | 31 | end |