Choose a version:
13% The original file has 542559 bytes (529.8k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 72805 bytes (71.1k, 13%).

After GZIP compression these minified files vary in size:
unpkg
  29382 bytes (28.7k)
CDN
Boot
  26032 bytes (25.4k)
CDN
cdnjs
  26032 bytes (25.4k)
CDN
gzip -6 (default)
  25817 bytes (25.2k)
local copy
gzip -9
  25768 bytes (25.2k)
local copy
libdeflate -12
  24984 bytes (24.4k)
local copy
7zip -mx=9 -tgzip
  24832 bytes (24.3k)
local copy
zultra
  24789 bytes (24.2k)
local copy
pigz -11 -n
  24733 bytes (24.2k)
local copy
kzip -s0 -rn -b6
  24675 bytes (24.1k)
local copy
Zopfli
  24620 bytes (24.0k)
local copy

perma-link to the smallest file on my server:
http://minime.stephan-brumme.com/files/lodash/lodash-4.17.19.min.js (or via HTTPS)

You will automatically get the smallest lodash 4.17.19 file, ETag caching is available and
if your browser doesn't support GZIP decompression then the uncompressed version will be sent.

Currently best Zopfli settings

Save 1412 bytes by using my lodash 4.17.19 Zopfli version instead of the best available CDN (5.74% smaller than cdnjs, 24620 vs. 26032 bytes):
You can use my super-compressed files for whatever purpose you like as long as you respect the library's original license agreement.
There are no restrictions from my side - but please avoid hot-linking if you run a high-traffic website.

These command-line settings yielded the best compression ratio so far (Linux version of zopfli-krzymod):
zopfli --i1000000 --mb8 --mls8192 --bsr17 --lazy --ohh

(found July 13, 2020)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 17  --bsr17
lazy matching in LZ77 yes  --lazy
optimized Huffman headers yes  --ohh
initial random W for iterations 1  --rw1
initial random Z for iterations 2  --rz2

Verify file integrity

After decompression, my uncompressed files are identical to the original ones:

MD5:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.17.19/dist/lodash.min.js --location | md5sum
913a2917447f6e4243fc9ffe398ad00e  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.17.19.min.zopfli.js.gz | md5sum
913a2917447f6e4243fc9ffe398ad00e  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.17.19/dist/lodash.min.js --location | sha1sum
345aa73fd11098fd6c1c59dc6e7214870bc8a9a9  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.17.19.min.zopfli.js.gz | sha1sum
345aa73fd11098fd6c1c59dc6e7214870bc8a9a9  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 29382 bytes 913a2917447f6e4243fc9ffe398ad00e (invalid)
Boot 26032 bytes 913a2917447f6e4243fc9ffe398ad00e (invalid)
cdnjs 26032 bytes 913a2917447f6e4243fc9ffe398ad00e (invalid)

Note: only the MD5 hashes are shown to keep things simple.

Other Versions

Available lodash versions at minime.stephan-brumme.com:

4.17.19, 4.17.18, 4.17.17, 4.17.16, 4.17.15, 4.17.14, 4.17.13, 4.17.12, 4.17.11, 4.17.10, 4.17.9, 4.17.5, 4.17.4, 4.17.3, 4.17.2, 4.17.1, 4.17.0, 4.16.6, 4.16.5, 4.16.4, 4.16.3, 4.16.2, 4.16.1, 4.16.0, 4.15.0, 4.14.2, 4.14.1, 4.14.0, 4.13.1, 4.13.0, 4.12.0, 4.11.2, 4.11.1, 4.11.0, 4.10.0,
4.9.0, 4.8.2, 4.8.1, 4.8.0, 4.7.0, 4.6.1, 4.6.0, 4.5.1, 4.5.0, 4.4.0, 4.3.0, 4.2.1, 4.2.0, 4.1.0, 4.0.1, 4.0.0

The project site contains an overview how well these versions were compressed.
Other interesting projects are AngularJS, BackboneJS, Bootstrap, D3, Dojo, Ember, jQuery, Knockout, React, Socket.IO, ThreeJS, UnderscoreJS and Vue.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
24620 bytes -3 bytes zopfli --i1000000 --mls8192 --bsr17 --lazy --ohh July 13, 2020 @ 17:35
24623 bytes -3 bytes zopfli --i100000 --mls8192 --bsr17 --lazy --ohh July 13, 2020 @ 11:15
24626 bytes -4 bytes zopfli --i10000 --mls8192 --bsr17 --lazy --ohh July 10, 2020 @ 18:57
24630 bytes -6 bytes zopfli --i1000 --mls8192 --bsr17 --lazy --ohh July 10, 2020 @ 17:35
24636 bytes zopfli --i100 --mls8192 --bsr17 --lazy --ohh July 10, 2020 @ 16:44

If there are multiple parameter sets yielding the same compressed size, only the first one found is shown.

Most recent activity on July 20, 2020 @ 12:51.

Heatmaps

This Zopfli heatmap visualizes how compression changes when modifying the --bsr and --mls parameter.
Cell's contents is the best filesize achieved (in bytes, hover with mouse over cells to see number of iterations).

Good parameters are green, bad are red. The best and worst are bold as well.
The brightness of the blue background color indicates how many iterations were processed:
10,000, 100,000 or 1,000,000.
bsr \ mls
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
bsr \ mls
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
24748 24746 24731 24743 24740 24730 24776 24716 24720 24735 24725 24738 24744 24728 24722
24674 24653 24660 24696 24687 24678 24673 24671 24669 24688 24670 24666 24660 24653 24672
24659 24660 24718 24663 24658 24650 24644 24704 24661 24662 24660 24715 24643 24659 24702
24708 24661 24713 24707 24699 24704 24705 24701 24702 24702 24702 24703 24702 24721 24710
24706 24666 24718 24707 24721 24700 24695 24701 24702 24702 24718 24710 24683 24706 24701
24666 24682 24718 24701 24720 24710 24702 24692 24705 24707 24704 24721 24691 24695 24702
24675 24673 24720 24654 24655 24643 24703 24636 24653 24648 24639 24707 24656 24702 24704
24654 24658 24666 24648 24643 24646 24644 24642 24662 24647 24652 24645 24647 24650 24662
24651 24653 24654 24655 24641 24640 24648 24649 24656 24652 24646 24652 24643 24646 24641
24647 24705 24659 24637 24641 24639 24642 24639 24649 24649 24636 24701 24651 24635 24706
24723 24669 24716 24706 24639 24656 24697 24707 24660 24703 24699 24702 24650 24713 24699
24636 24659 24717 24632 24644 24636 24702 24649 24659 24655 24637 24645 24645 24660 24661
24644 24668 24711 24644 24640 24641 24703 24705 24705 24700 24697 24707 24694 24709 24707
24638 24649 24664 24637 24632 24635 24651 24643 24640 24654 24704 24707 24620 24657 24703
24638 24656 24656 24638 24642 24649 24654 24640 24655 24660 24645 24653 24647 24656 24662
24635 24665 24647 24645 24637 24638 24703 24636 24649 24651 24642 24645 24633 24653 24654
24644 24664 24656 24642 24649 24646 24705 24643 24658 24660 24643 24652 24644 24658 24660
24667 24653 24712 24654 24627 24699 24697 24639 24665 24660 24642 24706 24654 24652 24705
24662 24662 24709 24697 24625 24647 24703 24697 24704 24700 24655 24700 24692 24698 24713
24657 24658 24663 24650 24633 24640 24644 24643 24664 24650 24710 24656 24645 24654 24704
24639 24641 24654 24637 24628 24643 24645 24653 24665 24652 24640 24699 24646 24649 24655
24634 24657 24651 24640 24635 24642 24654 24639 24664 24711 24704 24647 24695 24703 24659
24646 24652 24662 24637 24644 24659 24640 24648 24651 24653 24635 24712 24644 24651 24656

Due to the Monte Carlo design of my search algorithm, not all parameters have reached the same number of iterations yet:
Iterations Min. Bytes Reduction Coverage
100 24636 bytes 100%
1,000 24630 bytes -6 bytes 100%
10,000 24626 bytes -4 bytes 100%
100,000 24623 bytes -3 bytes 1.16%
1,000,000 24620 bytes -3 bytes 0.29%
10,000,000

KZIP has far less options available for tuning/optimization. I only played around with the number of blocks (parameter -n):
Blocks Min. Bytes Compared To Best Zopfli Compared To Best KZIP
24726 bytes +106 bytes (+0.43%) +51 bytes
24976 bytes +356 bytes (+1.45%) +301 bytes
24828 bytes +208 bytes (+0.84%) +153 bytes
24770 bytes +150 bytes (+0.61%) +95 bytes
24722 bytes +102 bytes (+0.41%) +47 bytes
24715 bytes +95 bytes (+0.39%) +40 bytes
24675 bytes +55 bytes (+0.22%)
24693 bytes +73 bytes (+0.30%) +18 bytes
24711 bytes +91 bytes (+0.37%) +36 bytes

Non-DEFLATE Algorithms

Archivers based on completely different compression algorithms often produce superior results.
Unfortunately, browsers only support gzip compression at the moment.
However, support for Brotli is constantly growing - for example, your browser actually supports it !
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 20755 bytes -3865 bytes (-15.70%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 21812 bytes -2808 bytes (-11.41%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 21889 bytes -2731 bytes (-11.09%)
Brotli (Wikipedia) brotli brotli -q 11 22950 bytes -1670 bytes (-6.78%)
LZMA2 (Wikipedia) xz xz -9 23392 bytes -1228 bytes (-4.99%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 24184 bytes -436 bytes (-1.77%)
Zstandard (Wikipedia) zstd zstd -19 24403 bytes -217 bytes (-0.88%)

Detailled Analysis

I wrote a DEFLATE decoder in Javascript. Click the button below to start a client-side analysis of the smallest gzipped files (may take a second):


Notes: pigz is a fast open source multi-threaded implementation of gzip written by one of the original authors of gzip.
However, when using compression level 11, pigz actually switches to the slower Zopfli algorithm and isn't multi-threaded anymore.
KrzyMOD's extensions to Zopfli offer the highest level of configuration and is therefore used for my brute-force search.
Ken Silverman wrote the closed-source KZIP compression program and Jonathon Fowler ported it to Linux.
Defluff was created by Joachim Henke; DeflOpt is a tool by Ben Jos Walbeehm.

website made by Stephan Brumme in 2015 and still improving in 2020.
all timestamps are displayed in central european time. see my changelog.
no flash, not even images or external css files - and everything squeezed into a single html file.
which was handsomely compressed before releasing it into the wild internet - obviously.

please visit my homepage and my blog, too.
email: minime (at) stephan-brumme.com

All trademarks are property of their respective owners. You know, the boring legal stuff.