I am trying to display the book images with images stored on my computer and their links in mongoDB atlas.
When all the books are being shown,none of the images are getting rendered while when I am viewing 1 book then the images are being shown. Also when I am hardcoding books link for any one image (for testing) then they are getting rendered.
I am using pug and here is my code
each book in book_list
div(class="w3-quarter")
a(href=book.url)
img(src=book.imgpath, alt=book.title, height="180px", width="200px", class="dp")
p(id="title") Title:- #{book.title}
p(id="author") Author:- #{book.author}
this is the result
and this is the code when selecting a specific book
div(class="w3-container")
h1 #{title}: #{results.title}
img(src=results.imgpath, alt="", height="250px", width="250px", class="dp")
question from:
https://stackoverflow.com/questions/65884290/why-pug-is-not-able-to-render-images-with-links-stored-in-mongodb-link 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…