How does light 'know' the shortest path?

  Open with LBRY

Light is the fastest thing in the universe.

In order to be this fast it always needs to take the shortest path (as it's speed cannot change).

So how does it always know what the shortest path is?
...
https://www.youtube.com/watch?v=h1YeIE0vEIs