Если я правильно понял, вам нужно установить свойство flex-wrap .
.cbp-slider-wrap {
display: flex; //Set images side by side.
flex-wrap: wrap; //Allows images to wrap into multiple lines avoiding them to shrinking. Number of image per line and their size can be controlled with 'max-width' (below)
}
.cbp-slider-item {
margin: 8px;
max-width: 30%; //In this specific case, 22% will fit 4 images per line whereas 47% 2 images per line.
}
Как это выглядит:
max-width: 30%
![](https://i.stack.imgur.com/Df5Qs.png)
max-width: 22%
![enter image description here](https://i.stack.imgur.com/QR4WD.png)
max-width: 47%
![enter image description here](https://i.stack.imgur.com/cWG1v.jpg)