Skip to content

refactor: default settings for compression#975

Merged
selul merged 7 commits into
developmentfrom
refactor/default_compression
Oct 6, 2025
Merged

refactor: default settings for compression#975
selul merged 7 commits into
developmentfrom
refactor/default_compression

Conversation

@RaduCristianPopescu

@RaduCristianPopescu RaduCristianPopescu commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

  • Automatically applies DPR for retina-enabled images or small images under 150px.
  • Changes speed-optimized compression to enable best format selection by default.
  • Removes AVIF setting toggler.
  • Adjust best format description.
CleanShot 2025-09-30 at 15 19 30@2x CleanShot 2025-09-30 at 15 19 44@2x

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

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?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors default settings for compression in Optimole to improve handling of retina images and AVIF format options. The changes modify how DPR (Device Pixel Ratio) is applied and update the user interface to reflect better default behaviors.

  • Automatically applies DPR for retina-enabled images or small images under 150px
  • Changes speed-optimized compression to enable best format selection by default
  • Conditionally displays AVIF settings based on a feature flag

Reviewed Changes

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

File Description
inc/url_replacer.php Adds automatic DPR logic for retina images and small images
inc/admin.php Updates localization with AVIF feature flag and improved descriptions
assets/src/dashboard/parts/connected/settings/Compression.js Enables best format by default for speed optimization and conditionally shows AVIF settings

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

Comment thread inc/url_replacer.php Outdated
Comment thread inc/url_replacer.php Outdated
@pirate-bot

pirate-bot commented Sep 30, 2025

Copy link
Copy Markdown
Collaborator

Plugin build for 72b0f72 is ready 🛎️!

@rodica-andronache

rodica-andronache commented Oct 3, 2025

Copy link
Copy Markdown

@Soare-Robert-Daniel, from what I understand from "On a fresh new install with the wp plugin, when connecting the plugin, the best format should be on and active.", this option "Automatic Best Image Format Selection" should be enabled by default https://vertis.d.pr/i/vBJErc and the images should have f:best in the URL.
Is that how it should be?
From what I've tried, that's not happening. https://unmatched-ape-cf154f.vertisite.cloud/

@Soare-Robert-Daniel Soare-Robert-Daniel force-pushed the refactor/default_compression branch from bd757a9 to b08acd8 Compare October 3, 2025 09:11
@Soare-Robert-Daniel

Copy link
Copy Markdown
Contributor

@rodica-andronache, you can check again for the f:best.

Here is an example: https://defaults.vertisite.cloud/hello-world/

CleanShot 2025-10-03 at 11 59 48@2x

@rodica-andronache

Copy link
Copy Markdown

it's working well

@selul selul merged commit 6772278 into development Oct 6, 2025
11 checks passed
@selul selul deleted the refactor/default_compression branch October 6, 2025 12:40
@pirate-bot

Copy link
Copy Markdown
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.

6 participants