This code is for the shortcode and flex box solution demonstrated in the how-to YouTube video.
For the shortcode, use the shortcode in the shortcode file and the #gallery-1 img
CSS example for removing the default border around the gallery images.
For flex, you'll need to declare a flex-gallery
ID in your row container. Then, use the first flexbox CSS rule. This will always keep the four images in one row for any device.
If you want to have the images wrap in a 2x2 for small devices (as an example), use the second set of flex CSS rules. Adjust the media query to suit your needs.
In the responsive example, I added margin
attributes to create gutters around the images.
See more about flex wrap and adding gutters on MDN.
Enjoy!
The tutorial for how to use this code is on YouTube.