Skip to content

Release v2.5.1

Choose a tag to compare

@github-actions github-actions released this 20 Aug 08:01
· 2 commits to master since this release

Thumbnail Size Display Fix

A follow-up to 2.5.0, fixing a long-standing display bug in the thumbnail size cards.

What was wrong

The cards showed no dimensions at all for the built-in 1536x1536 and 2048x2048 sizes, and Medium Large read 768 × 0.

WordPress registers those two sizes with add_image_size() on plugins_loaded and gives them no *_size_w / *_size_h options — but get_current_image_sizes() read the dimensions from exactly those non-existent options, so they came back empty.

What changed

  • Dimensions now come from wp_get_registered_image_subsizes(), which is authoritative and covers every built-in size.
  • Those two sizes are also the only built-in ones remove_image_size() can drop from the registry, which is what happens once you disable them here. The fixed dimensions core names them after are kept as a fallback for that case — otherwise a disabled size would lose its dimensions again, or disappear from the list entirely and become impossible to re-enable.
  • An unconstrained axis now renders as auto instead of 0, so Medium Large reads 768 × auto. That size is 768px wide at whatever height preserves the aspect ratio.

This is a display-only change. Which thumbnails get generated, and the batch cleanup tool, are untouched.

Verification

Verified against WordPress 7.1: 15 checks covering both the registered and the disabled-and-unregistered path, stale known_sizes rows being corrected rather than preserved, and the legacy false values an older version could have stored. The 2.5.0 media regression suite still passes and Plugin Check is clean.

Screenshots have been retaken so they show the corrected grid.

Full Changelog: v2.5.0...v2.5.1