I have tried many different lines of code, but for some reason my index.js doesn’t recognize my local jpg file that is in the same directory. I have checked that the path is correct. I’m trying to use my img constant to use in an HTML Rewriter that modifies a specific img element’s src.
But for some reason, the website builds but the picture doesn’t show. Here’s one the many lines of code that I’ve tried.
const img = ‘./ProfilePic.pg’
I’ve also tried using require and import keyword but that didn’t help either.