Moving packery call to js to trigger when images loaded