Configure imaging
Configure imaging.
Processing options
These are the default settings for processing images:
imaging:
anchor: Smart
bgColor: '#ffffff'
hint: photo
quality: 75
resampleFilter: box
[imaging]
anchor = 'Smart'
bgColor = '#ffffff'
hint = 'photo'
quality = 75
resampleFilter = 'box'
{
"imaging": {
"anchor": "Smart",
"bgColor": "#ffffff",
"hint": "photo",
"quality": 75,
"resampleFilter": "box"
}
}
- anchor
- (
string
) When using the Crop or Fill method, the anchor determines the placement of the crop box. One ofTopLeft
,Top
,TopRight
,Left
,Center
,Right
,BottomLeft
,Bottom
,BottomRight
, orSmart
. Default isSmart
. - bgColor
- (
string
) The background color of the resulting image. Applicable when converting from a format that supports transparency to a format that does not support transparency, for example, when converting from PNG to JPEG. Expressed as an RGB hexadecimal value. Default is#ffffff
.
- hint
- (
string
) Applicable to WebP images, this option corresponds to a set of predefined encoding parameters. One ofdrawing
,icon
,photo
,picture
, ortext
. Default isphoto
. See details. - quality
- (
int
) Applicable to JPEG and WebP images, this value determines the quality of the converted image. Higher values produce better quality images, while lower values produce smaller files. Set this value to a whole number between1
and100
, inclusive. Default is75
. - resampleFilter
- (
string
) The resampling filter used when resizing an image. Default isbox
. See details
EXIF data
These are the default settings for extracting EXIF data from images:
imaging:
exif:
disableDate: false
disableLatLong: false
excludeFields: ""
includeFields: ""
[imaging]
[imaging.exif]
disableDate = false
disableLatLong = false
excludeFields = ''
includeFields = ''
{
"imaging": {
"exif": {
"disableDate": false,
"disableLatLong": false,
"excludeFields": "",
"includeFields": ""
}
}
}
- disableDate
- (
bool
) Whether to disable extraction of the image creation date/time. Default isfalse
. - disableLatLong
- (
bool
) Whether to disable extraction of the GPS latitude and longitude. Default isfalse
. - excludeFields
- (
string
) A regular expression matching the tags to exclude when extracting EXIF data. - includeFields
- (
string
) A regular expression matching the tags to include when extracting EXIF data. To include all available tags, set this value to".*"
.
To improve performance and decrease cache size, Hugo excludes the following tags: ColorSpace
, Contrast
, Exif
, Exposure[M|P|B]
, Flash
, GPS
, JPEG
, Metering
, Resolution
, Saturation
, Sensing
, Sharp
, and WhiteBalance
.
To control tag availability, change the excludeFields
or includeFields
settings as described above.
Last updated:
March 5, 2025
:
content: Consolidate configuration documentation (b6cae5cbc)
Improve this page