renderImagesWithTags(payload) {
    console.log(payload)

    let result = []
    for (var key in payload){

      // key should be the image path without the server's url
      let tags = payload[key].map(tagImagePair => tagImagePair.tag)
      let tagsHtml = tags.map(tag => <div>{tag}</div>)
      let imageSrc = this.state.baseURL + key

      result.push(
        <div className="imageWrapper">
          <img src={imageSrc} className="gallery"/>
          {tagsHtml}
        </div>
      )
    }
    return result
  }
// render all images with their respective tags below them
render all images with their respective tags below them
render all images with their respective tags below them
renderImagesWithTags(payload) {
    console.log(payload)
    let result = []
    for (var key in payload){
      let tags = payload[key].map(tagImagePair => tagImagePair.tag)
      let tagsHtml = tags.map(tag => <div>{tag}</div>)
      let imageSrc = this.state.baseURL + key
      result.push(
        <div className="imageWrapper">
          <img src={imageSrc} className="gallery"/>
          {tagsHtml}
        </div>
      )
    }
    return result
  }
renderImagesWithTags ( payload ) { console . log ( payload ) let result = [ ] for ( var key in payload ) { let tags = payload [ key ] . map ( tagImagePair => tagImagePair . tag ) let tagsHtml = tags . map ( tag => < div > { tag } < / div > ) let imageSrc = this . state . baseURL + key result . push ( < div className = "imageWrapper" > < img src = { imageSrc } className = "gallery" / > { tagsHtml } < / div > ) } return result }
render all images with their respective tags below them
render all images with their respective tags below them
// key should be the image path without the server's url