The justified layout expects images in different dimensions, such as portrait and landscape images. The logic behind the justified layout is that all images will be resized by a specific height (thus, all images will have different widths but the same height, as set in the Row Target Height setting), then the justified layout will automatically fit all images nicely together. You may notice that not all justified gallery rows have the same height. The reason is that the height set under "Row Target Height" is the lever we use to fit everything nicely. The algorithm will get as close to the target row height as possible. Also, images will not stretch to fit a single row when there is extra space due to missing images.