How to apply the same levels adjustment to multiple images (or layers)

I have a timelapse recording where I need to do uniform levels adjustment. I can load them all in in one image as layers, but when I adjust levels it changes the selected layer only.

So I basically want to do Colors / Layers / Auto Input Layers on one image, but apply the same change to all images in the sequence.

How do I do this in GIMP?

Foreword

Anything "Auto" is not going to be the same on all images. So

• you can accept that images are going to be transformed differently. This can be a good thing in some cases.
• you want to apply the very same changes to all: you have to use an explicit/manual tool on the others (Levels/Curves...) but if you use an "auto" tool on the first, Gimp won't tell you exactly what it did to the first image. So in practice you have to forego the use of automated tools, and use Levels/Curves/Brightness-contrast on the first image.

Without using Gimp

This could also be done with a shell script built on ImageMagick. For instance, stretching the contrast can be as simple as!

magick convert input.jpg -normalize output.jpg


You can combine several operations into a single call, for instance, I create low-res images from my camera image with a single call:

convert "$f" -modulate 100,120 -geometry 3000 -sharpen 0x1.0 -quality 85 "$dir/$(basename "$f" .JPG).jpg"


This: 1) increases saturation, 2) resizes the image, 3) applies a bit of sharpening, and 4) saves the image with JPEG quality 85.