HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
danielgtaylor
jpeg-archive
C2014–2021
danielgtaylor / jpeg-archive

jpeg-archive

Utilities for archiving JPEGs for long term storage.

10Distinct people
10Mentions
0Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Utilities for archiving JPEGs for long term storage.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2014-08-06 18:36:08 UTC to 2021-07-15 13:06:48 UTC.

01232014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC202
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC303
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC211
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

What Hacker News says

10 sources
i am using this jpeg recompressor: https://github.com/danielgtaylor/jpeg-archive Tried a lot of combinations of quality, and settled for -q medium --max 75% --accurate Anything higher makes no sense/difference, even if you print it at A3. And my images are 8-18-24Mpix. i'm not a pro-foto but somewhat of an old pre-print school - Your level of pickiness may vary :/ Effectively it is like 4-8 times down - Total went from 150Gb into 30Gb - that's about 40,000 images. Which still doesn't solve the OP's or anyone's problem of too-easy-producible digital "assets".. but is more manageable.
In A Storage Crisis
The dithering is nice for some images but it takes some details on graphs etc.. The example image given can be re-compressed using techniques like structural similarity (SSIM)[1] or Multi-scale structural similarity (2003 Paper)[2]. Using jpeg-archive[3] I resized the example image from the blog[4] with decent results: /tmp ls -1sh *.jpg *.png | sort -nr 740K 6a00e0099229e88833022ad3b23825200b-750wi.png 100K 6a00e0099229e88833022ad3b23825200b-750wi.jpg 64K small-fry.jpg 56K mpe.jpg 24K ms-ssim.jpg [1] https://en.wikipedia.org/wiki/Structural_similarity [2] https://ece.uwaterloo.ca/~z70wang/publications/msssim.pdf [3] https://github.com/danielgtaylor/jpeg-archive [4] http://krisdedecker.typepad.com/.a/6a00e0099229e88833022ad3b...
In How to Build a Low-Tech Website
jpeg-archive (https://github.com/danielgtaylor/jpeg-archive) may be the better use case images that you don't intend to have downloaded a billion times. I tried jpeg-compress -c in.jpg out.jpg (-c skips output that is bigger than the original) and got visually good results, lower file sizes, and quick processing. The file size ultimately will be larger the guetzli, but not by that much more and it doesn't take an extremely long time to compress one image.
In Compressing Images Using Google’s Guetzli
The main innovation here is using advanced simulation of how humans perceive distortions (https://github.com/google/butteraugli) and optimizing to that. In principle JPEG was always about removing details humans can't see, but in practice encoders used rough approximations and fixed quality settings. This one goes all-in on accurate measurement and tuning quality settings per image automatically. In lossy compression quality setting affects file size much more than choice of image format (e.g. there's 15-30% difference in best quality/filesize between old codecs like JPEG/J2K/VP8/JXR, but within each codec's settings range the file size can vary by 300%), so having a codec that picks the lowest good-enough quality is very useful. Compared to MozJPEG: - it's tuned for higher-quality images (butteraugli is said to be best for q=90+, MozJPEG
Read the rest
's sweet spot is around q=75) - it's much slower to compress (both produce standard JPEGs, so decoding is fast as usual) - MozJPEG doesn't automagically pick quality setting, but you can find optimal quality using an external tool, e.g. https://github.com/danielgtaylor/jpeg-archive
In Guetzli JPEG encoder
DNGs and RAWs aren't generally (AFAIK) uncompressed. But ideally they're losslessly compressed. They're all(?) "TIFF files" - but AFAIK saying something is a valid TIFF, is almost as helpful as saying something is "a file". Apparently Sony uses some kind of lossy compression for it's files - I just tested with a jpeg2000 encoder on the same file above, and the size of the j2k file is approximately the same as the ARW: 7MB. Btw, the lep-file is 1.7MB. Note that the uncompressed (flat) PPM file is 29MB as is the uncompressed TIFF - but simply running the TIFF through lzma reduces the size to 9.3MB. So ~7MB isn't that far off. [ed: And while the lep-file was 1.7MB, shaving a bit off the original jpg, mozjpeg with defaults+baseline created a jpeg (at q=75, per default) 472k in size. Lep managed to shave a bit off that too - ending up with PPM
Read the rest
->mozjpeg->lepton resulting in a 359K file. The (standard) progressive mozjpeg ended up at 464K. This is not quite apples to apples, though, I think the comparable quality setting for mozjpeg would probably be 90 to 95 or so -- ending up around 1.6MB. But for this particular (rather crappy) image - I couldn't readily tell any difference. Which I suppose is where https://github.com/danielgtaylor/jpeg-archive comes in.]
In Lepton image compression: saving 22% losslessly from images at 15MB/s
This looks very useful for archiving, but as others have pointed out, less useful for web development. I did lots of research on image compression for a book recently and found quite a few helpful tools. jpeg-archive [^1] is designed for long term storage and you can still serve the images over the web. imageflow [^2] has just been kickstarted and looks really promising for use with ASP.NET Core. mozjpeg is also showing progress and if FLIF takes off then that will be great. Scalable images would be fantastic. No more resizing and all the security issues that brings [^3]. [^1]: https://github.com/danielgtaylor/jpeg-archive [^2]: https://www.imageflow.io [^3]: https://imagetragick.com
In Lepton image compression: saving 22% losslessly from images at 15MB/s
There's an existing tool that does this and uses mozjpeg. It's called jpeg-recompress and is part of the jpeg-archive project on Github. It currently can use mean-pixel-error, SSIM (the default), MS-SSIM and SmallFry (an implementation of the patented algorithm used by the JPEG mini app). So they may be open to adding this new comparison algorithm too. edit: someone already filed an issue asking them to look at it: https://github.com/danielgtaylor/jpeg-archive/issues/40
In Show HN: Smlr – re-encode jpegs using butteraugli visual quality measurement

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.