CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers
https://stack.jimmycai.com
GNU General Public License v3.0
5.06k stars 1.66k forks source link

Photoswipe: Pictures stay small when clicked - as user I would expect a higher resolution image #934

Closed ottok closed 7 months ago

ottok commented 9 months ago

What happened?

I am using the built-in Photoswipe on my site. Example post at https://optimizedbyotto.com/post/gitlab-mariadb-debian/

When a user clicks on one of the images to zoom in, Photoswipe does open it in an overlay, but the image size stays unchanged.

The image size is controlled by CSS. Initially the width is scaled down to 100% of available space:

image

When clicked Photoswipe adds custom CSS rules:

element.style {
    width: 818px;
    height: 540px;
}

image

The image file itself that gets loaded is the same file all the time: https://optimizedbyotto.com/post/gitlab-mariadb-debian/gitlab-merge-request-example.png (dimensions 1356x896px).

Hugo version

0.122.0

Theme version

1.0.0

What browsers are you seeing the problem on?

Chrome

More information about the browser

No response

Relevant log output

No response

Link to Minimal Reproducible Example

https://optimizedbyotto.com/post/gitlab-mariadb-debian/

ottok commented 9 months ago

I confirm this is fixed now, zoomed image is now large and actually zoomed and this issue can be closed.

While testing this I discovered another issue, which I filed as #939.