You must upload files to folders by upload date (for example, current year - current month - current date).
I would not necessarily say "must" as there can also be performance penalties from deep hash structures that are minimally populated.
Caching is also a factor that can very favorably impact image delivery. At least w.r.t. the most popular ones.
One more fer' the road: Many cloud providers are using SSD backed storage modern days. Is file I/O actually your bottleneck? Hmmm... 🤔
How many images are you envisioning for YOUR site/use case?
Just a couple shootin' from the hip thoughts. 🤔