Updated to work with picture tag as well as span's