adjust image sizing in feature #326
-
Checks
Link to your website repohttps://github.com/ptitle/macroEEB Version of Lab Website Template you are using1.3.4 DescriptionI am using the feauture component for my team page (https://github.com/ptitle/macroEEB/blob/main/people/index.md). But one image is cut off - it must be too tall (this is the last team person on the page: https://ptitle.github.io/macroEEB/people/). I tried adding a width or height argument, but it doesn't seem to have an effect. How can I adjust this so that the full image is shown? (there are many other aspects not working on my site currently, but I know that - this is a work in progress) |
Beta Was this translation helpful? Give feedback.
Answered by
vincerubinetti
Jun 3, 2025
Replies: 1 comment 4 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
vincerubinetti
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to just remove the restriction that keeps all the images at a consistent size, comment out the
aspect-ratio
line within the.feature-image
class in_styles/feature.scss
:But the
aspect-ratio
is there to ensure images look good without authors having to do much, as long as the subject of the picture is in the center of the frame. I would instead just crop that last picture to be more square, with the face closer to the center.You could also change
object-fit: fit;
toobject-fit: contain;
and removebox-shadow: var(--shadow)
, which I don't think looks good: