{"id":"de177fb893a2ca82","repo":"gohugoio/hugo","slug":"invalid-metadata-source-q-in-imaging-meta-sources","errorCode":null,"errorMessage":"invalid metadata source %q in imaging.meta.sources config; must be one of %s","messagePattern":"invalid metadata source %q in imaging\\.meta\\.sources config; must be one of (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"resources/images/config.go","lineNumber":607,"sourceCode":"\tif len(cfg.Meta.Fields) == 0 {\n\t\t// Default: include all fields except technical metadata.\n\t\t// Don't change this for no good reason. Please don't.\n\t\tcfg.Meta.Fields = []string{\n\t\t\t\"! *{GPS,Exif,Exposure[MPB],Contrast,Resolution,Sharp,JPEG,Metering,Sensing,Saturation,ColorSpace,Flash,WhiteBalance}*\",\n\t\t}\n\t}\n\n\tif len(cfg.Meta.Sources) == 0 {\n\t\t// Default to EXIF and IPTC (XMP is slower to decode).\n\t\tcfg.Meta.Sources = []string{\"exif\", \"iptc\"}\n\t} else {\n\t\t// Normalize to lowercase.\n\t\tfor i, s := range cfg.Meta.Sources {\n\t\t\tcfg.Meta.Sources[i] = strings.ToLower(s)\n\t\t\tif !validMetaSources[cfg.Meta.Sources[i]] {\n\t\t\t\tkeys := slices.Collect(maps.Keys(validMetaSources))\n\t\t\t\tslices.Sort(keys)\n\t\t\t\treturn fmt.Errorf(\"invalid metadata source %q in imaging.meta.sources config; must be one of %s\", s, keys)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\ntype ExifConfig struct {\n\t// Regexp matching the Exif fields you want from the (massive) set of Exif info\n\t// available. As we cache this info to disk, this is for performance and\n\t// disk space reasons more than anything.\n\t// If you want it all, put \".*\" in this config setting.\n\t// Note that if neither this or ExcludeFields is set, Hugo will return a small\n\t// default set.\n\tIncludeFields string\n\n\t// Regexp matching the Exif fields you want to exclude. This may be easier to use\n\t// than IncludeFields above, depending on what you want.","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/gohugoio/hugo/blob/8a468df065a75c1c7cf9f6850f32148746590ea5/resources/images/config.go#L589-L625","documentation":"imaging.meta.sources controls which metadata blocks (EXIF, IPTC, XMP) Hugo decodes from images. Each entry is lowercased and checked against validMetaSources; an unknown source name is a config error since Hugo has no decoder for it.","triggerScenarios":"Setting imaging.meta.sources = [\"exif\", \"xmp2\"] or any entry not in the valid set (the error message lists the sorted valid keys) in site config; fires during config init.","commonSituations":"Typos like 'ipct' for 'iptc'; guessing source names ('metadata', 'jpeg'); using a value from a different tool's config; leftover entries after a Hugo version changed the supported set.","solutions":["Correct the entry to one of the valid sources listed in the error message (e.g. exif, iptc, xmp).","Remove imaging.meta.sources entirely to get the default of exif + iptc.","Check the Hugo docs for imaging.meta.sources valid values for your Hugo version."],"exampleFix":"# before (hugo.toml)\n[imaging.meta]\nsources = [\"exif\", \"ipct\"]\n# after\n[imaging.meta]\nsources = [\"exif\", \"iptc\"]","handlingStrategy":"validation","validationCode":"valid := map[string]bool{\"exif\": true, \"xmp\": true, \"iptc\": true}\nfor _, s := range cfg.Imaging.Meta.Sources {\n    if !valid[strings.ToLower(s)] {\n        return fmt.Errorf(\"invalid imaging.meta.sources entry %q\", s)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check imaging.meta.sources entries against the documented allowed set for your Hugo version before building","Use lowercase source names exactly as documented; avoid typos like \"EXIF \" with whitespace","Pin the Hugo version so the allowed set doesn't shift under you"],"tags":["hugo","config","image-metadata","validation"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}