1. calculate the aspect-ratio for each slide (slide.width / slide.height)
2. find the maximum (instead of the minHeight)
3. set the slideshow-containers aspect-ratio to the maximum
Now the everything is settled at the beginning and window.onresize is not required anymore.
So, once again thanks for your inputs. Some thoughts later they proved to be helpful! 🍻