Repository navigation
fix: disable img sizes=auto to mitigate Gutenberg bug (1.2.2) - #65
Merged
Merged
Conversation
WordPress 6.7+ adds a `sizes="auto"` attribute to lazy-loaded images via the `wp_img_tag_add_auto_sizes` filter. A Gutenberg bug in this behavior is affecting potentially hundreds of partner sites, and the upstream fix (WordPress/gutenberg#80386) has no confirmed release date. Register `add_filter( 'wp_img_tag_add_auto_sizes', '__return_false' )` in Plugin::initialize() so it applies to every active install regardless of module settings, allowing a quick fleet-wide rollout. Remove once the Gutenberg fix ships. Bumps version to 1.2.2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🔱 Poseidon started reviewing this PR — central run. |
There was a problem hiding this comment.
🔱 Poseidon Review
Summary — Emergency fleet-wide mitigation that disables the WordPress 6.7+ sizes="auto" image attribute via a new register_core_compat_filters() helper; low risk, correct filter name, no issues found on this pass.
- 🐛 Fix — Registers
add_filter( 'wp_img_tag_add_auto_sizes', '__return_false' )inPlugin::initialize()to work around the upstream Gutenberg bug. - 🔧 Chore — Patch version bump 1.2.1 → 1.2.2 across
a8csp-atlantis.phpandpackage.json.
ℹ️ Review info
- Commit: 831cdb4
- Files reviewed: a8csp-atlantis.php, package.json, src/Plugin.php
- Files skipped: none
- Model: claude-opus-4-8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Emergency mitigation. WordPress 6.7+ automatically adds a
sizes="auto"attribute to lazy-loaded images via thewp_img_tag_add_auto_sizesfilter. A Gutenberg bug in this behavior is affecting potentially hundreds of partner sites, and the upstream fix — WordPress/gutenberg#80386 — has no confirmed release date.This PR disables the auto-
sizesbehavior fleet-wide so we don't have to wait on a Gutenberg release:Where it lives / why
Registered in
Plugin::initialize()(a newregister_core_compat_filters()helper) rather than behind a module, so it runs on every active install regardless of module settings — enabling the fastest possible blanket rollout. The helper is clearly marked temporary and links the Gutenberg PR so it's easy to find and remove once the upstream fix ships.Safety
add_filter()+__return_falseare both WordPress core — no version/dependency risk.Version
Patch bump 1.2.1 → 1.2.2 (
a8csp-atlantis.phpheader +@version,package.json), per the release checklist inREADME.md.Follow-up
Revert
register_core_compat_filters()(or just the single line) once the Gutenberg fix is released and has propagated to sites.🤖 Generated with Claude Code