Even with all the changes I made, there was STILL an occasional slow load of images, and the delay was always 5 seconds when this happened.
I finally was able to chase this down. Rate limiting on the name servers was kicking in and 5 seconds is the default resolver time before it gives up and moves on to the next name server.
I have adjusted the rate limiting up so that they will rarely be invoked, added a rotate argument to the resolv.conf configuration so that it spreads the load across the servers, and I’ve added timeout:1 to make it give up after one second instead of five if a server doesn’t respond to minimize the page load delay in the event of a server failure.
This seems to have completely eliminated the delayed loading.