From eea28584a2a2101e171230d892a0d41c72c16781 Mon Sep 17 00:00:00 2001 From: Brian Miller Date: Thu, 17 Jun 2021 13:46:00 -0500 Subject: [PATCH] Display image in it native or croped aspect ratio Change the fit from crop to fill and add fill=solid. This makes it display the image based on height or width filling space first and fills the remainder with transparancy. Is logo causes it to fill with white instead of transparent. --- packages/marko-web-photoswipe/components/images.marko | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/marko-web-photoswipe/components/images.marko b/packages/marko-web-photoswipe/components/images.marko index 74504b908..8d5830c35 100644 --- a/packages/marko-web-photoswipe/components/images.marko +++ b/packages/marko-web-photoswipe/components/images.marko @@ -36,7 +36,8 @@ $ const items = images.map((image) => { const defaultOptions = { w: maxSize, h: round(maxSize / (16 / 9)), // default 16:9 height - fit: "crop", + fit: "fill", + fill: "solid", }; const imageOptions = {