Skip to content

Conversation

@abaicus
Copy link
Contributor

@abaicus abaicus commented Dec 4, 2025

All Submissions:

Changes proposed in this Pull Request:

  • Fixes issue where CSS files generated on post save didn't have the image URLs replaced;
  • Properly sets up the replacer on the specific rest routes used to generate the CSS files;
  • This was previously already working when regenerating the CSS, but not when saving the post;

Closes Codeinwp/optimole-service#1594.

How to test the changes in this Pull Request:

  1. Install Otter Blocks;
  2. Add the following line in a .php file under /wp-content/mu-plugins to make sure CSS is generated regardless of how large the Otter styles on a page are:
  • add_filter('styles_inline_size_limit', '__return_zero');
  1. Create a page containing one or more Otter section blocks and add background images to them;
  2. Save and publish the page;
  3. On the frontend, check the browser inspector, the background image should be loaded from Optimole CDN;

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 Dec 4, 2025

Plugin build for f4bf311 is ready 🛎️!

@abaicus abaicus force-pushed the fix/otter-css-bg-compat branch from d175dc0 to f4bf311 Compare December 4, 2025 18:55
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.

3 participants