Dear all,
I suppose this is coming from gift so I opened an issue there.
Did anybody else notice this behavior?
Dear all,
I suppose this is coming from gift so I opened an issue there.
Did anybody else notice this behavior?
Same here. I always make sure that i use progressive jpegs on my site and this is a big disappointment.
Quoting from the issue’s closing message:
The gift package does not provide any image decoding/encoding functionality.
I believe hugo uses the standard image/jpeg package to encode jpeg images. As far as I know it does not support progressive jpeg enconding.
Now I am confused. Is hugo using the standard package? Or gift? I assume gift since we have filters like blur and friends.
Both. But since both Hugo and Gift is limited by that constraint**, there currently is no (known to me) progressive JPEG encoder written in Go (stdlib has a decoder). Which is unfortunate, and the reason is probably that “Google doesn’t need it”. I’ve been banking on that it should happen already, but …
** This is a little the same situation as with webp, where there also is not Go encoder/decoder. Google has one webp library written in C (or C++) which we, if we really really wanted it, could use. The same applies to progressive JPEGs, I assume – but it comes at a high cost.
Thanks for clearing things up. What I found in go is guetzli and I don’t believe it handles progressive encoding. Mozjpeg would be a nice candidate, but still in C (++).
I don’t know if it is worth the high cost you mentioned ( I assume site generation speed). Sure for a highly optimized site containing many images it might help allowing hugo to do all the work and eliminate the need for additional (external) image processing tasks.
No, speed is not a concern, it is plenty fast enough. It’s about maintainance/integration/security. We currently only have LibSASS as an C++ dependency, and I thought long and hard about that before doing it – but caved in as I/we really needed it. That was the reason for the extended Hugo version, which brought in its own build pipeline etc. And dependency updates isn’t trivial, which I’m currently thinking a little about to prepare for LibSASS getting SASS module support …
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.