Commit 476844dc9d926c93849472b43ba12e2970c03a42

Authored by Andrey Karpikov
1 parent 28b701c6

add webp image format for preview

... ... @@ -1930,7 +1930,7 @@ jQuery(document).ready(function(){
1930 1930
1931 1931
1932 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 1935 var initImageDragDrop = function(){
1936 1936 $('.drop-down-upload').each(function(){
... ...
... ... @@ -466,7 +466,7 @@
466 466 };
467 467 defaultFileTypeSettings = {
468 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 471 html: function (vType, vName) {
472 472 return compare(vType, 'text/html') || compare(vName, /\.(htm|html)$/i);
... ...
... ... @@ -25,7 +25,7 @@ module Kanjai
25 25
26 26 def self.image?(url)
27 27 ext = File.extname(url)
28   - ['.jpg', '.gif', '.jpeg', '.png', '.svg'].include?(ext)
  28 + ['.jpg', '.gif', '.jpeg', '.png', '.svg', '.webp'].include?(ext)
29 29 end
30 30
31 31 end
... ...
1 1 module Kanjai
2   - VERSION = "0.0.377"
  2 + VERSION = "0.0.378"
3 3 end
... ...