Reputation: 3
So i'm working on a movie project and getting movie details from api call, for the img tag i combined base url and img path from api response, the images are not loading even though the url is correct. I checked the url by logging it in console and when i click on the img link from console i get redirected to a page displaying the movie img so i guess i made a mistake in img tag and not able to figure out what. This is what i get in browser When i logged the url in console i get proper urls and these redirect me to the image when i click them This is the code, mapping the movies array and displaying individual posters, appending "img_url" to "movie.poster_path" to get the full poster link.
I tried modifying the path for src attribute in img tag but nothing changes.
Upvotes: 0
Views: 61
Reputation: 205
You have a typo in your code, attribute src should have movie.poster_path
, not movies.poster_path
Upvotes: 3