-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
What happened?
I am using the built-in Photoswipe on my site. Example post at https://optimizedbyotto.com/post/gitlab-mariadb-debian/
The width of the box where the image is shown is 817 pixels:
From the automatic downscaled images generated by Hugo, the 1024 px wide would be enough for this view: https://optimizedbyotto.com/post/gitlab-mariadb-debian/gitlab-merge-request-example_hud15c7454f04aaeae0ed05bf49d3115d8_214572_1024x0_resize_box_3.png
However, seems that the original 1694 pixel wide image https://optimizedbyotto.com/post/gitlab-mariadb-debian/gitlab-merge-request-example.png is always used no matter how narrow the rendered image is.
Tag has:
<img src="https://optimizedbyotto.com/post/gitlab-mariadb-debian/gitlab-merge-request-example.png"
width="1694" height="1119"
srcset="
https://optimizedbyotto.com/post/gitlab-mariadb-debian/gitlab-merge-request-example_hud15c7454f04aaeae0ed05bf49d3115d8_214572_480x0_resize_box_3.png 480w,
https://optimizedbyotto.com/post/gitlab-mariadb-debian/gitlab-merge-request-example_hud15c7454f04aaeae0ed05bf49d3115d8_214572_1024x0_resize_box_3.png 1024w,
https://optimizedbyotto.com/post/gitlab-mariadb-debian/gitlab-merge-request-example.png 1694w"
loading="lazy" alt="Example merge request" class="gallery-image" data-flex-grow="151" data-flex-basis="363px">
I don't now how this is supposed to work, but since the tag already has smaller images in srcset, perhaps there is some existing JavaScript that simply isn't loaded etc?
Hugo version
0.122.0
Theme version
1.0.0
What browsers are you seeing the problem on?
Chrome
