Как разбить массив на части заданного размера?
const chunked = (arr, chunkSize) =>
  arr.reduce((acc, n, i) => (
    (i % chunkSize) || acc.push([]),
    acc[acc.length - 1].push(n),
    acc
  ), []);
или

const chunked = (arr, chunkSize) =>
  arr.reduce((acc, n, i) => (
    (acc[i / chunkSize | 0] ??= []).push(n),
    acc
  ), []);
или

const chunked = (arr, chunkSize) =>
  Array.from(
    { length: Math.ceil(arr.length / chunkSize) },
    (n, i) => arr.slice(i * chunkSize, (i + 1) * chunkSize)
  );
Или в более понятном виде:
[
  {
    path: './name-1.jpg',
    filename: 'name-1'
  },
  {
    path: './name-2.jpg',
    filename: 'name-2'
  },
  {
    path: './name-3.jpg',
    filename: 'name-3'
  },
  {
    path: './name-4.jpg',
    filename: 'name-4'
  }
].reduce((acc, item, idx, arr) => { if (idx % 2) { acc.push([ arr[idx-1], item ]) } return acc }, [])

/*
[
  [
    { path: './name-1.jpg', filename: 'name-1' },
    { path: './name-2.jpg', filename: 'name-2' }
  ],
  [
    { path: './name-3.jpg', filename: 'name-3' },
    { path: './name-4.jpg', filename: 'name-4' }
  ]
]
*/