score:1

Accepted answer

  const fetchUserProfileImage = async (userProfileId) => {
    return axios.get(`http://localhost:5000/api/v1/users/${profile.userId}/image/download`)

  }

  return userProfiles.map(async (profile,index) => {
    const userProfileImageBase64 = await fetchUserProfileImage(profile.userId)
    return (
      <div key={index}>
        <MyDropZone userId={profile.userId}></MyDropZone>
        <h3>{profile.userId}</h3>
        {
          profile.userId ? (<img src={`data:image/png;base64, ${userProfileImageBase64}`}/> ) : <h5>No profile Image Uploaded</h5>
        }
      </div>
    );
  })

Related Query

More Query from same tag