I have here products that may have one or more than one images. Depending on the productCode. If the productCode is the they belong to the same product. productCode could be found on the filename of the images, its after the first underscore. For instance if the filename is AA_BB_CC.jpg. The productCode is BB.
You can check samples images in my codesandbox.
So if images have the same productCode, it should add up to the product. My problem is on this part. Adding images of product with the same productCode.
Response of expected output
CodePudding user response: