We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
HASH_LENGTH
1 parent e88239a commit 56b8398Copy full SHA for 56b8398
lib/jekyll/transcode-image-filters.rb
@@ -3,16 +3,14 @@
3
4
module Jekyll
5
module TranscodeImageFilters
6
- HASH_LENGTH = 32
7
-
8
# Computes the name of the file in the cache.
9
# @param absolute_path_source [String] Full path to the source file
10
# @param resolution [String] As an example: 900x900
11
# @param format [String] As an example: webp or jpg
12
# @return [String]
13
def _compute_cache_filename(absolute_path_source, resolution, format)
14
hash = Digest::SHA256.file(absolute_path_source)
15
- short_hash = hash.hexdigest()[0, HASH_LENGTH]
+ short_hash = hash.hexdigest()[0, 32]
16
17
if resolution && resolution != "original"
18
"#{short_hash}-#{resolution}.#{format}"
0 commit comments