0

I am trying to load images in my index.ejs as bellow

 <% parsedData.forEach((movie)=>{%>
    <div class="col-md-3 col-sm-4 poster">
       <img
           src="<%= imageBaseUrl+movie.poster_path %>"
           alt="<%= movie.title %>"
       />
    </div>
 <%}) %>

imageBaseUrl set as:

imageBaseUrl="http://image.tmdb.org/t/p/w300";

But I am getting error as:

Refused to load the image '<URL>' because it violates the following

Content Security Policy directive: "img-src 'self' data:".
  • maybe this helps? https://stackoverflow.com/questions/40360109/content-security-policy-img-src-self-data – cmgchess Jan 30 '22 at 07:30

0 Answers0