To make thumbnail images on a static Webflow page (like HOME 2) the same size while keeping them responsive, use consistent container sizing and apply CSS properties that preserve aspect ratio.
1. Use Fixed Aspect Ratio Containers
- Wrap each image inside a Div Block that simulates a fixed aspect ratio (e.g., 16:9 or 1:1).
- Set the container’s width using `%**, VW, or fixed px — depending on layout needs.
- Set the container’s padding-top to enforce aspect ratio:
- Example ratios:
- 1:1 (square) → padding-top: 100%
- 16:9 → padding-top: 56.25%
- 4:3 → padding-top: 75%
- This creates a responsive placeholder that scales by width and holds the aspect ratio.
2. Set Image to Cover the Container
- Drag the Image element into the ratio container.
- Select the image and set:
- Position: Absolute (Top: 0, Left: 0, Width: 100%, Height: 100%)
- Object-fit: Cover (in the Style panel) to ensure the entire box is filled without distortion.
- Give the aspect-ratio container a class name (e.g.,
thumbnail-container
). - Apply the same class to all image wrappers so the styling remains consistent across all thumbnails.
4. Test Responsiveness
- Preview the site at different breakpoints.
- Make adjustments to the container width using % or VW units if needed, but don’t change the height directly — height is driven by padding-top to maintain aspect.
5. Optional: CMS Thumbnails
- If thumbnails are coming from a CMS Collection and you want a consistent crop, use a Background Image in a Div Block instead of an Image element.
- This lets you use background-size: cover and keeps the image visually consistent inside a fixed ratio box.
Summary
Wrap each thumbnail in a fixed-aspect-ratio container using padding-top technique, set the image to absolute fill with object-fit: cover, and apply the same class across all thumbnails. This keeps all images the same thumbnail size while staying responsive without distorting the image.