Skip to content

Conversation

RaduCristianPopescu
Copy link
Contributor

@RaduCristianPopescu RaduCristianPopescu commented Sep 12, 2025

All Submissions:

Changes proposed in this Pull Request

When JetPack performs the synchronization, it pulls the WP_Posts without Optimole applied. The compatibility modifies the contents of the payload so that the content and the featured image include Optimole optimizations.

WordPress Reader

CleanShot 2025-09-12 at 15 03 15@2x
background-image: url("https://i0.wp.com/mlhgoovhyl5g.i.optimole.com/w:auto/h:auto/q:mauto/ig:avif/https://robert-optimole-test.instawp.co/wp-content/uploads/2025/09/167113836-efdbde32-7863-4a24-9d2d-979025b51260.jpeg?quality=80&ssl=1&strip=info&w=1200"); background-size: cover; background-repeat: no-repeat; background-position: center center;

Gmail

CleanShot 2025-09-12 at 15 06 07@2x

When received by Google, they switch our CDN with theirs, but the origin is Optimole.

src="https://ci3.googleusercontent.com/meips/ADKq_NZC7WDiAynJxsi287Z8tYysdNP_dn6X2MyCrQstkwS67N_tzKyN5o-EUKYzujjqfjJCTHsvHL1ebLavpYSztH8IsGEsH0gJcpsxUzAQODtUpPMM-4XE5V8c5ckuqFrPPXEFPg5tvi3feOx1DAp8Sx5-sgMfxXmIxuyVRTDX6JMTJYXktQassKNtSP4kPKhEV85R=s0-d-e1-ft#https://robert-optimole-test.instawp.co/wp-content/uploads/2025/09/167113836-efdbde32-7863-4a24-9d2d-979025b51260.jpeg?w=504"

Closes https://github.com/Codeinwp/optimole-service/issues/1570

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@pirate-bot
Copy link
Collaborator

pirate-bot commented Sep 12, 2025

Plugin build for fa2a8f6 is ready 🛎️!

@RaduCristianPopescu RaduCristianPopescu changed the title Fix/jetpack fix: add compatibility with JetPack Sep 12, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds compatibility with JetPack plugin to ensure Optimole image optimizations are applied when JetPack performs content synchronization. This fixes an issue where JetPack was pulling WP_Posts without Optimole optimizations applied.

  • Added Optimole URL processing to JetPack's sync process for post content, excerpts, and featured images
  • Integrated with JetPack's jetpack_sync_before_send_jetpack_published_post filter to modify payload content
  • Enabled early loading for the compatibility to ensure proper hook registration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
inc/manager.php Added 'jetpack' to the list of possible compatibilities
inc/compatibilities/jetpack.php New compatibility class implementing JetPack sync integration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@selul selul merged commit d0e3652 into development Sep 16, 2025
11 checks passed
@selul selul deleted the fix/jetpack branch September 16, 2025 06:45
@pirate-bot
Copy link
Collaborator

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants