Best fit on a single page (L PAGE and R PAGE)
Best fit works page by page too. Switch the Templates panel to L PAGE or R PAGE and it lists the best layouts for the photos on that page, including justified layouts sized to that page's photos. Dropping photos onto a page picks a layout for that page the same way.

More in Templates & template editor
See all 23Change the template on a spread or page26:52What are justified layouts?GuideBest fit vs Full library in the Templates panelGuideWhy Remove Image Gap is greyed out on justified layoutsGuidePreview a template before applying it27:42Favorite the templates you use most28:06Filter the templates panel28:20Use a template with more or fewer photos28:26Warning when a template has fewer slots29:09Open and close the template editor (E)33:04Copy and paste a placeholder in the template editor34:00Snapping guides in the template editor34:07Turn a snapping type off35:03Resize an image placeholder in the template editor36:09Resize two neighboring photos at once (shared edge handle)GuideSet an exact aspect ratio on an image placeholder in the template editor36:51Save a custom templateGuideCustom templates in other projectsGuideI can't find a custom template I savedGuideA custom template won't saveGuideGet back to the built-in templatesGuideHide the on-canvas template arrows59:29
