+ /**
+ * @param array $images
+ * @return string
+ * @throws \Friendica\Network\HTTPException\ServiceUnavailableException
+ */
+ private static function makeImageGrid(array $images): string
+ {
+ // Image for first column (fc) and second column (sc)
+ $images_fc = [];
+ $images_sc = [];
+
+ for ($i = 0; $i < count($images); $i++) {
+ ($i % 2 == 0) ? ($images_fc[] = $images[$i]) : ($images_sc[] = $images[$i]);
+ }
+
+ return Renderer::replaceMacros(Renderer::getMarkupTemplate('content/image_grid.tpl'), [
+ 'columns' => [
+ 'fc' => $images_fc,
+ 'sc' => $images_sc,
+ ],
+ ]);
+ }
+
+