Use the images loaded plugin with Isotope.
Register it like this in your js file:
var $container = $('#container').imagesLoaded( function() {
$container.isotope({
// options
itemSelector: '.item',
masonry: {
gutter: 15
}
});
});