October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Make Consistent Website Thumbnails at the Same Size

Use a shared aspect ratio and choose Cover to fill and crop, or Contain to preserve the entire image. Here’s how to do it with CSS or WordPress.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Give every thumbnail slot the same aspect ratio, then choose whether images should fill the frame and crop or remain fully visible with empty space around them. Do not stretch every image to identical dimensions: stretching changes its proportions and distorts the subject.

Choose how thumbnails should fit

First decide what “the same size” means for your page: identical-shaped display boxes, identically sized image files, or both. For most website grids, consistent display boxes are what create a tidy layout; the source images can have different dimensions.

Approach What you get Trade-off Best for
Cover and crop A filled frame with a consistent shape Parts near the edges may be cut off Uniform cards, galleries, and grids
Contain or proportional fit The full image remains visible Unused space may appear inside the frame Product images, diagrams, or images where no detail can be lost
Generated image size A reusable server-generated size, with crop behavior you choose Hard crops remove content; proportional resizing does not guarantee a filled frame Recurring components managed in WordPress

These are separate decisions: the aspect ratio sets the frame shape, the fit and focal point determine what remains visible, and source resolution affects sharpness.

Use CSS for a consistent display frame

For a typical thumbnail grid, set the box’s aspect ratio and let the image cover it. This example creates 16:9 frames. Change the ratio to suit the component, such as 4:3 or 1:1.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
.thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
<div class="thumbnail">
  <img src="/images/article-thumb.jpg" alt="A person working at a desk">
</div>

The fixed ratio keeps the displayed boxes consistent even when the source images have different ratios. The cover fit fills each frame by cropping the excess. Adjust the image’s object-position when the important subject is not centered; for example, object-position: 70% center shifts the visible area toward the right side of the source. Check representative images at desktop and mobile widths so the chosen crop does not hide faces, text, or other important details.

Preserve the entire image instead

When cropping would remove necessary content, use object-fit: contain. The full image stays in view, but a source whose aspect ratio differs from its frame will leave unused space in one direction. Give the frame a background color if that space should be visually intentional.

.thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

Set thumbnail behavior in WordPress

For a block-editor image

In the Image block, choose an aspect ratio and set the image scaling behavior to Cover or Contain. Cover fills the area and may crop; Contain shows the full image and may leave empty space. With Cover, use the focal-point control to move the subject into view. These presentation settings can change how the image appears without changing the original file.

For a recurring theme component

Register a named image size with add_image_size(). A hard crop produces the requested dimensions and can use a crop position; proportional resizing avoids cutting off the source but may not fill the exact rectangle.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
// In a theme or plugin PHP file:
add_action( 'after_setup_theme', function () {
    add_image_size( 'article-card', 640, 360, true );
} );

The final true requests a hard crop. For proportional resizing, use false instead. A crop-position array can specify a position such as array( 'left', 'top' ) in place of the boolean. Use the corresponding registered size when requesting the image for the component, rather than loading the original by default.

set_post_thumbnail_size() can also set the featured-image size: with crop disabled it scales proportionally; with crop enabled it crops, and a crop-position array can specify the position.

WordPress documents its default thumbnail as 150 × 150 pixels with square cropping; this is a configurable product default, not a recommendation for every site. Media settings can adjust it. If you change registered dimensions, existing generated images do not automatically acquire the new size. Regenerate thumbnails for existing media using an appropriate site workflow, then check the affected pages.

Choose dimensions without wasting image data

A consistent frame does not require every original upload to have identical pixel dimensions. Choose an output size suitable for the component and the sharpness required at its actual display size. Serving an unnecessarily large original can increase transferred image data; serving one that is too small can look soft.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use responsive image support so the browser can select a more suitable source size for the display context instead of always downloading the largest original.
  • Test the component at the largest size it will actually be displayed, including high-density screens where applicable.
  • Keep the frame ratio consistent while letting responsive source selection handle the appropriate image data.
  • Inspect both the crop and the rendered sharpness after changing theme sizes or upload workflows.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need to create a screenshot thumbnail of a webpage, rather than resize or crop an image already on your site, ScreenshotNeo can return a screenshot from one GET request. This is a separate workflow from setting a site’s thumbnail CSS or WordPress image sizes. To request a WebP screenshot, use the API example below; the API documentation lists its options and response details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.

Sign up for 1,000 free screenshots a month, with no card required.

Troubleshoot common thumbnail problems

  • Images look stretched: Do not force both width and height on an image without a fit rule. Use a fixed-ratio frame with Cover or Contain, or proportional dimensions.
  • Important content is cut off: Use Contain if the whole image must remain visible, or adjust the focal point or object position for a crop.
  • Some frames show blank space: This is expected with Contain when image and frame ratios differ. Use Cover only if cropping is acceptable.
  • WordPress images still use the old dimensions: Newly registered sizes do not resize previously generated thumbnails automatically. Regenerate existing thumbnails and verify the selected size is used by the component.
  • Thumbnails look soft: Check the actual rendered size and available source resolution; make sure the selected responsive source is not smaller than the display requires.
  • Pages transfer more image data than expected: Check whether the component is loading full-size originals where a responsive image candidate would suffice.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.