miromannino/Justified-Gallery — pull request #48 by davidsalazar (2014-09-10 23:21:30+00:00)
Title: Sniff for dimensions before attempting to preload.

I don't expect you to merge this as it's simply a proof of concept. I think you need to make DRY, but I think you should start sniffing for dimensions in the markup instead of preloading all the images to check for dimensions. Also, you may want to tweak your css animations accordingly to reduce any conspicuous changes to the DOM.