Changing masonry based on height of image