diff --git a/middleman-core/lib/middleman-core/cli/build.rb b/middleman-core/lib/middleman-core/cli/build.rb index b56ab320..91a8c97e 100644 --- a/middleman-core/lib/middleman-core/cli/build.rb +++ b/middleman-core/lib/middleman-core/cli/build.rb @@ -178,7 +178,7 @@ module Middleman::Cli # @return [void] def execute! # Sort order, images, fonts, js/css and finally everything else. - sort_order = %w(.png .jpeg .jpg .gif .bmp .svg .svgz .ico .woff .otf .ttf .eot .js .css) + sort_order = %w(.png .jpeg .jpg .gif .bmp .svg .svgz .ico .webp .woff .otf .ttf .eot .js .css) # Pre-request CSS to give Compass a chance to build sprites logger.debug '== Prerendering CSS' diff --git a/middleman-core/lib/middleman-more/extensions/asset_hash.rb b/middleman-core/lib/middleman-more/extensions/asset_hash.rb index 3f915033..a21eba38 100644 --- a/middleman-core/lib/middleman-more/extensions/asset_hash.rb +++ b/middleman-core/lib/middleman-more/extensions/asset_hash.rb @@ -1,7 +1,7 @@ require 'middleman-core/util' class Middleman::Extensions::AssetHash < ::Middleman::Extension - option :exts, %w(.jpg .jpeg .png .gif .js .css .otf .woff .eot .ttf .svg), 'List of extensions that get asset hashes appended to them.' + option :exts, %w(.jpg .jpeg .png .gif .webp .js .css .otf .woff .eot .ttf .svg .svgz), 'List of extensions that get asset hashes appended to them.' option :ignore, [], 'Patterns to avoid adding asset hashes to' def initialize(app, options_hash={}, &block) diff --git a/middleman-core/lib/middleman-more/extensions/cache_buster.rb b/middleman-core/lib/middleman-more/extensions/cache_buster.rb index 98e9d647..20d00f9b 100644 --- a/middleman-core/lib/middleman-more/extensions/cache_buster.rb +++ b/middleman-core/lib/middleman-more/extensions/cache_buster.rb @@ -24,7 +24,7 @@ class Middleman::Extensions::CacheBuster < ::Middleman::Extension def asset_url(path, prefix='') http_path = super - if http_path.include?('://') || !%w(.css .png .jpg .jpeg .svg .svgz .js .gif).include?(File.extname(http_path)) + if http_path.include?('://') || !%w(.css .png .jpg .jpeg .svg .svgz .webp .js .gif).include?(File.extname(http_path)) http_path else if respond_to?(:http_images_path) && prefix == http_images_path