Fix to only loop through images instead of also rendering the containing div in the loop