0

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.

2
  • Can you please add code to show what you are doing? Commented Nov 17, 2022 at 8:21
  • Your code looks fine. Are there any console errors? Are there any failed requests in the Network tab (select Img as type)? Commented Nov 17, 2022 at 8:25

1 Answer 1

3

You have a typo in your code, attribute src should have movie.poster_path, not movies.poster_path

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.