Skip to content

Convert PNG sizes to WebP too (4.3.1) - #164

Merged
jasperf merged 1 commit into
mainfrom
featured-image-png-webp
Oct 28, 2026
Merged

jasperf merged 1 commit into
mainfrom
featured-image-png-webp

Conversation

@jasperf

@jasperf jasperf commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • image_editor_output_format now maps image/png to image/webp as well as JPEG. In 4.3.0 only JPEG was mapped, so about 180 older posts with a PNG featured image show the full PNG (e.g. 327 KB on /wordpress-setup-digital-ocean/) under the title.
  • No other change. The original-URL filter for The SEO Framework already accepts PNG, so og:image / twitter:image stay the original file.
  • Version bumped in style.css, readme.txt (Stable tag + changelog) and CHANGELOG.md.

Test plan

  • Local imagewize.test: regenerated the PNG featured image of /wordpress-setup-digital-ocean/; the page image is now a 15 KB WebP (was the 327 KB PNG), og:image and twitter:image stay the PNG
  • After release and deploy: back up the DB, then wp media regenerate <PNG featured IDs> --skip-delete --yes on production
  • Spot-check a few old posts (live <img> is WebP, og:image is the original), and a transparent PNG logo if one is a featured image

The filter also applies to every PNG upload, so logos and screenshots in the library get WebP sizes; WebP keeps transparency.

@jasperf
jasperf merged commit 0b23af8 into main Oct 28, 2026
3 checks passed
@jasperf
jasperf deleted the featured-image-png-webp branch October 28, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant