diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 557b9b8..073acaa 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -321,11 +321,12 @@ import PhotoSwipeLightbox from "photoswipe/lightbox"
import "photoswipe/style.css"
let lightbox: PhotoSwipeLightbox
+let pswp = import("photoswipe")
function createPhotoSwipe() {
lightbox = new PhotoSwipeLightbox({
gallery: ".custom-md img, #post-cover img",
- pswpModule: () => import("photoswipe"),
+ pswpModule: () => pswp,
closeSVG: '',
zoomSVG: '',
padding: { top: 20, bottom: 20, left: 20, right: 20 },