diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-03-20 18:08:48 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-03-20 18:09:13 -0300 |
commit | a42b51cbe00c765981a53918f7532d67c4b650ad (patch) | |
tree | 7ac6d68cf927884a31dadeb0cac948ca44714832 /src/content/dependencies/linkPathFromMedia.js | |
parent | 5ee821e53b683e8375e771dd7c6bfb219b2c573a (diff) |
content, client: image-overlay: set thumb aspect ratio
Although the thumbnail image width automatically matches the width of the main image, the height by default will be a multiple of the thumbnail's own height, which may result in a mismatched aspect ratio due to the much lower accuracy of thumbnail intrinsic dimensions.
Diffstat (limited to 'src/content/dependencies/linkPathFromMedia.js')
-rw-r--r-- | src/content/dependencies/linkPathFromMedia.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/content/dependencies/linkPathFromMedia.js b/src/content/dependencies/linkPathFromMedia.js index be72a113..d71c69f8 100644 --- a/src/content/dependencies/linkPathFromMedia.js +++ b/src/content/dependencies/linkPathFromMedia.js @@ -44,6 +44,8 @@ export default { fileSize && {'data-original-size': fileSize}, + {'data-dimensions': dimensions.join('x')}, + !empty(availableThumbs) && {'data-thumbs': availableThumbs |