Automatically reduce thumbnail image size on Quarto website #3793
Unanswered
matthew-law
asked this question in
Q&A
Replies: 1 comment 1 reply
-
#9390 is another thread on the same theme. did you ever solve this @matthew-law ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've set up a website using the Quarto blog template, which includes a list of several posts and thumbnails for each of the posts. By default the thumbnails are taken from the first image included the post, if there is no
image:
specified in the YAML-like section at the start of the post's .qmd file. This works great, but many of the images I use in are very high definition (thousands of px across) – this is what I want in the posts themselves, but means that even on fast internet the website's homepage can take a while to load all the images.Is there any automatic way to resize each of the thumbnail images so they're at most a few hundred px across?
If there isn't already a simple way to do this, I could write a script that found the thumbnail image for each post, created a resized version, saved it to the directory for the post, then specified that thumbnail as the
image:
for the post – I think I could get that to run using thepre-render:
project option. But thought it worth checking there isn't already an easier way to achieve the same thing!Beta Was this translation helpful? Give feedback.
All reactions