I've been using an AJAX request to fetch data from my database and then appending it to a div. However, I've run into an issue with the image source. My image files are stored in a public folder named "image_files". The problem arises when trying to retrieve the image through the source and concatenate it with the image filename from the database in AJAX.
Below is the problematic section of my code:
<div class="thumbnail">'+`<img src="{{ asset('image_files/' . '+data[i]['featured_img']+') }}" alt=""></div>
Any help on this matter would be greatly appreciated.