This is how I came up with it . Super short and elegant
TabView(selection: $selectedPhotoIndex) {
ForEach(photos, id: \.self){ photo in
WebImage(url: URL(string: photo))
.resizable()
.indicator(.activity)
.transition(.fade)
.scaledToFill()
.frame(width: UIScreen.main.bounds.width, height: 400)
.clipped()
//to display the correct paging index
.tag(photos.firstIndex(of: photo) ?? 0)
}
}.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))