Images get cropped when generated from /assets/images to /resources/_gen/images
manyids2 opened this issue · 4 comments
Description
I have images of size > 1k pixels width and height (1173x1376), and they get cropped when resources are generated.
Steps to reproduce
Download the image in assets/images/home.png
Use the shortcode
{{< figure
src="images/home.png"
caption="View whole slide images from terminal.">}}
Only the centre of the image is shown and the sides are cropped.
Expected result
It should show the image without cropping
Actual result
Only the centre of the image is shown and the sides are cropped.
Environment
Paste the information here as shown by npm run info
> homepage-v2@0.0.0 preinfo
> npm version
{
'homepage-v2': '0.0.0',
npm: '10.2.0',
node: '21.1.0',
acorn: '8.10.0',
ada: '2.7.2',
ares: '1.20.1',
base64: '0.5.0',
brotli: '1.0.9',
cjs_module_lexer: '1.2.2',
cldr: '43.1',
icu: '73.2',
llhttp: '9.1.2',
modules: '120',
napi: '9',
nghttp2: '1.57.0',
nghttp3: '0.7.0',
ngtcp2: '0.8.1',
openssl: '3.0.10+quic',
simdutf: '3.2.18',
tz: '2023c',
undici: '5.26.4',
unicode: '15.0',
uv: '1.46.0',
uvwasi: '0.0.19',
v8: '11.8.172.15-node.14',
zlib: '1.2.13.1-motley'
}
> homepage-v2@0.0.0 info
> npm list
homepage-v2@0.0.0 /home/x/blogs/homepage-v2
├── @hyas/doks-core@1.3.0
├── @hyas/images@2.0.3
├── @hyas/inline-svg@1.0.5
├── @hyas/seo@2.1.0
├── @tabler/icons@2.46.0
├── exec-bin@1.0.0
├── gethyas@2.2.2
├── hugo-installer@4.0.1
└── shx@0.3.4
> homepage-v2@0.0.0 postinfo
> exec-bin node_modules/.bin/hugo/hugo version
hugo v0.121.1-00b46fed8e47f7bb0a85d7cfc2d9f1356379b740+extended linux/amd64 BuildDate=2023-12-08T08:47:45Z VendorInfo=gohugoio
thuliteio/images#20 fixes this — you can expect the new @hyas/images
release... tomorrow!
Wow! Thank you! That is fantastic!
Images 3.0 was just released — read more in the Images documentation
I guess the default figure shortcode should fix it for you — otherwise, you could use the process argument
Closing — reopen if necessary