Hello I have a quick question, I have a site using netlify large media to handle my image files. In the site I want to get the total number of images in the folder and display them. I am trying to do that via a Node function
const paths = ['/assets/images/action']
fs.readdir(path, function (err, content) {
name = path.split('/').pop();
results[name] = content.length;
}
That isn’t the entire function I’m just omitting the rest for brevity. The issue is no matter what path configuration I use ‘assets/images’ ‘src/assets/images’ ‘./assets/images’ Node returns telling me the file path doesn’t exist. My question is what is the large media file structure and how can I access the folders my images are stored in?