Skip to content

Release#1029

Merged
selul merged 20 commits intomasterfrom
development
Mar 25, 2026
Merged

Release#1029
selul merged 20 commits intomasterfrom
development

Conversation

@vytisbulkevicius
Copy link
Copy Markdown
Contributor

@vytisbulkevicius vytisbulkevicius commented Mar 9, 2026

  • Added a static cache (Optml_Settings) to avoid repeated get_option calls within a single request, improving performance and consistency.
  • Fixed a potential PHP 8.2+ fatal error in get_svg_for by ensuring $sizes is always an array before destructuring (e.g. when images are missing or offloaded). Props to @fuleinist for the contribution.
  • Improved optmlSrcsetDetector logic to prevent generating 1x DPR images larger than the original size, fixing incorrect srcset capping. Props to @fuleinist for the contribution.
  • Fixed incorrect notice display when disabling the scaling option.

Prevent buffer flush conflicts
@pirate-bot
Copy link
Copy Markdown
Collaborator

pirate-bot commented Mar 9, 2026

Plugin build for ed55849 is ready 🛎️!

pirate-bot and others added 11 commits March 9, 2026 20:43
…PHP 8.2+

Fixes #1034

When an image file is missing (offloaded to CDN or deleted), the
get_svg_for() method would fail with a fatal error on PHP 8.2+ because
list() was being called on a boolean false value instead of an array.

This fix adds an is_array() check before the list() assignment to
gracefully handle missing images, allowing the fallback logic to
attempt getting dimensions from attachment metadata.
The srcset detector was capping 1x DPR variants at the CSS-rendered
width at profiling time, not the image's natural pixel width. This
caused blurry images on viewports wider than the profiling screen.

Before: A 2560px image profiled on 1440px screen would only generate
srcset entries up to 1440w for 1x DPR, causing upscaling blur on
larger screens.

After: The srcset is capped at the image's naturalWidth, ensuring
all available resolution is used regardless of profiling viewport.

Fixes #1030
Revert "Saved featured image on post save"
Memoized result within request
fix: prevent fatal error with list() assignment on missing images in PHP 8.2+
fix: cap srcset against naturalWidth instead of currentWidth
Displayed correct notice when disabling scaling option
@selul selul linked an issue Mar 25, 2026 that may be closed by this pull request
@selul selul merged commit 7649ecf into master Mar 25, 2026
13 checks passed
@pirate-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.2.2 🎉

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 Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment