Perhaps you could do something like this:
var pattern = /class="([^"]+)"/g;
var classes = [];
[...string.matchAll(pattern)].
forEach(
match => classes = classes.concat( (match[1].split(" ")) )
);
console.log(classes); // ["img-fluid", "big-img", "logo", "link", "link-red", "link-2"]
Effectively here we have a regex that matches class="..." and captures everything inside of the quotes. Then we run matchAll with the addition of the spread operator (...) so that it produces an array we can iterate over with forEach.
Then we simply loop over the array, split the captured string into an array and merge with the classes array