Images load synchronously and fixes memory leak

Currently galleries load all images asynchronously, this isn't a big issue on small galleries but on 50+ images it can make weaker internet connections struggle. 

This makes the images load synchronously and then deletes the element that preloaded the image out of the DOM which reduces the plugins memory usage.