Hugo 0.162.0 packages
Brew - Hugo Brew package for macOS and Linux - updated ![]()
Snap Package - Hugo Snap package for Linux - updated ![]()
Docker/CI Image - Hugo Docker image for Continuous Integration - updated ![]()
FreshPort - Hugo FreshPort package for FreeBSD - not yet updated ![]()
Debian - not yet updated ![]()
Ubuntu - not yet updated ![]()
Fedora Copr - Hugo RPM package for Fedora and CentOS - not yet updated ![]()
Chocolatey - Hugo Chocolatey package for Windows - updated ![]()
Scoop - Hugo Scoop package for Windows - updated ![]()
I have a question about the security change regarding text/html, specifically this mention in the docs:
By default, the HTML content format (media type
text/html) is denied. Hugo emits HTML file content verbatim, which could allow arbitrary JavaScript execution. See the classification table for a mapping of content formats to media types.
. . . does this mean that HTML included (or âhand-authored,â as the 0.162.0 release doc called it) in Markdown like the following example will be denied by default?
<span class="red">Note</span>: This is a really important note.
(And I do realize that a Markdown file by definition is not text/html, but just want to be sure I understand.)
HTML mixed with Markdown in a .md file is not affected by this change.
Thank you for that confirmation.
Very excited about the AVIF support. That may let me move image processing away from the NodeJS/gulp tools Iâm using presently, which is a big deal for me. Thank you.
Me too. When youâre doing so, I would read imaging: Add quality setting per image format ¡ Issue #14957 ¡ gohugoio/hugo ¡ GitHub
Testing this it seems that the quality scale (default 75) isnât directly comparable, so e.g. WebP with quality 75 may be similar in quality to AVIF quality 60. Knowing that may help reduce the file sizes. The above issue is about allowing per format quality values in the config, but you can currently set it when processing each image.
Thank you. Yes, quality scales are pretty much arbitrary and â in my experience, at least â arenât consistent between formats or even tools (i.e. one toolâs 60 quality may be another toolâs 70).
With my JS-based tools, my configs had per-format quality settings, but also different quality settings for different output sizes. My feeling was that with some output sizes, I could get away with lower-quality settings while, conversely, others seemed to demand higher-quality. I donât have any real heuristics for what works; it was mostly just a matter of looking at some sample images and seeing how they looked at different settings.
With that in mind, being able to set the quality per-image (or rather per-output-image-size) might even be more useful than having a global setting in the config.toml file.
You can do that today, see e.g.
This new AVIF capability allowed a quick switch/upgrade from WEBP in my Hugo responsive image generation ![]()
![]()
And thank you for the confidence inspiring companion demo site: GitHub - bep/hdrsdr.com: Testing out AVIF (with HDR) support in latest Hugo ¡ GitHub
I noticed this all smoothly handles and resizes 10 bit rec2020 HLG exports from Darktable raw photo edits, and modern browsers (Chrome, âŚ) render it all nicely for âHDRâ displays.
But handphone OS, Instagram, some browsers(?) etc still seem to choke/lack true AVIF 10-bit HDR colorspace handling, and still can only handle âmetadata HDRâ 8 bit SDR formats like âUltraHDRâ jpg. Picture/source templating patterns with img fallbacks are likely a requirement for Hugo sites moving forward with native HDR media capabilities.
The HDR version of the demo site looks weird on FF 151.0.2/macOS Sonoma. âweirdâ in the sense of âevery image is far too dark compared to the SDR variant, nearly nothing to be seenâ.
Thereâs this issue from 2022 mentioning the phenomenon.
Also on Safari 26.2, the SDR images are noticeably darker than the HDR images (again on macOS Sonoma).
Only Chrome seems to show the HDR/SDR images in remotely similar colors.
The (main) reason we went for true-HDR and not e.g. SDR + gain maps is that the latter wouldnât work (or it would require a big change) with Hugoâs processing filters.
Iâm on macOS Sequoia v15.7.7, M1 Mac Mini, Floorp (Firefox fork v151) and the HDR is all very dark whereas the SDR version is ânormal lookingâ. Iâm excited with the new support of AVIF, it bodes well for photo heavy sites like portfolios. Thanks for all the work!
Yea, I see that too, it looks normal on Chrome, Brave and Safari. This smells like a HDR bug in Firefox â note that the large HDR AVIF on the demo site are exported from Adobe LightRoom (no Hugo processing involved), and they also look dark. I will try to do some research on the subject.
A quick Google for âfirefox dark hdr avifâ suggests that Firefox just donât support HDR very well. It should be possible to do something ala:
<picture>
<!-- HDR-capable displays -->
<source srcset="image-hdr.avif" type="image/avif" media="(dynamic-range: high)">
<!-- HDR with PQ transfer function (optional for specific mastering) -->
<source srcset="image-hdr-pq.avif" type="image/avif" media="(color-gamut: p3) and (dynamic-range: high)">
<!-- Standard (SDR) fallback for all other displays -->
<img src="image-sdr.jpg" alt="A beautiful landscape image">
</picture>
Not sure if the above would tackle the Firefox case on HDR displays, though âŚ