Remove Exif from images in content on publishing?

If I generate a website (create the public directory), I want to get the Exif info automatically removed from the images. I tried something like:

    disableDate = true
    disableLatLong = true
    excludeFields = ".*"
    includeFields = ""

but that didn’t work.
As far as I understand, this can only be done in the images are in the /assets folder?

I don’t think that Hugo can remove Exif data. But there are enough tools out there that are be able to do that, eg the free exiftool

Yes, Hugo can write Exif data (so also remove), see Exif | Hugo ( I want to keep my original images ‘original’, only when they are published, I want to remove that data. Using an external tool is an extra step and time consuming, I am talking about 4000 images.

I don’t see that anywhere in the documentation.I just read “returns an EXIF object”. But then I might be overlooking something. Just follow whatever your see in the documentation about writing EXIF.

1 Like

Ok, probably not the correct link, but this one: Image processing | Hugo (

It’s all about extracting EXIF. But apparently you see singing I don’t – then by all means use that.

What is the meaning of ‘disableLatLong’ and when should I use this?

So that Hugo does not extract these data. Performance, memory… It’s all about making EXIF available to templates and Shirtcodes.

Hugo removes EXIF data when you process an image.

If you simply include an image in markdown without processing it via a render hook, the EXIF data is not removed.

To remove everything, use exiftool recursively on the public directory. It’s very fast. Something like:

exiftool -r -all= -ext jpg -ext webp -overwrite_original public

Really strange option!!! Why should Hugo extract LatLong if I don’t ask for this? In the help it is for me not clear which options can be set or not, at least confusing. Probably quality, hint and bgColor can be set, but Lat/Long not. Ok. I will use an external tool for this.

I tried the exiftool. ExiftoolGui doesn’t support recursive modifications. The command line is not as fast as I expected. I have to remove Exif data from approx. 2500-3000 jpg’s. I find out that in Windows it is much more faster :slight_smile: