Skip to content

feat: convert unsupported featured image formats for Google Business#1086

Open
vytisbulkevicius wants to merge 1 commit into
developmentfrom
feat/pro/439
Open

feat: convert unsupported featured image formats for Google Business#1086
vytisbulkevicius wants to merge 1 commit into
developmentfrom
feat/pro/439

Conversation

@vytisbulkevicius

@vytisbulkevicius vytisbulkevicius commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Google Business Profile (GMB) doesn't support WebP images, so posts whose featured image is a WebP file were shared without an image. GMB hands Google an image URL to fetch, so the fix is to give it a non-WebP URL.

When the featured image is a WebP file in the local uploads directory, a JPEG copy is created (via wp_get_image_editor) and its URL is used. For any other case — an already-supported format, a remote/CDN image, or a conversion failure — the original URL is returned unchanged, so behaviour is never worse. The unsupported-format list is filterable (rop_gmb_unsupported_image_formats).

Will affect the visual aspect of the product

NO

Test instructions

  • Set a .webp image as a post's featured image.
  • Share the post to a connected Google Business Profile account.
  • Confirm the image now appears on the Google Business post (a …-rop-gmb.jpg sibling is created in uploads).
  • Use a JPEG/PNG featured image and confirm sharing is unchanged.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/tweet-old-post-pro/issues/439

Google Business Profile does not accept WebP images, so posts with a WebP
featured image were shared without their image. When the featured image is a
WebP file in the uploads directory, convert a JPEG copy and use that URL. Any
other case (supported format, remote image, conversion failure) keeps the
original URL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Jun 19, 2026
@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for d63c2fa is ready 🛎️!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants