Skip to content

imagewize/theme-icon Block Binding Fix#141

Merged
jasperf merged 3 commits into
mainfrom
v2.15.3
Jul 3, 2026
Merged

imagewize/theme-icon Block Binding Fix#141
jasperf merged 3 commits into
mainfrom
v2.15.3

Conversation

@jasperf

@jasperf jasperf commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This release (version 2.15.3) resolves a critical defect in the imagewize/theme-icon block binding that caused SVG icons to render broken in both the editor and the frontend. The root cause was that icon assets in resources/images/ were never included in the Vite build manifest, so Vite::asset() could not resolve their hashed URLs at render time. The fix adds the assets: ['resources/images/**'] option to the laravel() plugin in vite.config.js, which emits the icons into the manifest and restores URL resolution — the supported mechanism for laravel-vite-plugin v3+ and Vite 8, replacing the older import.meta.glob approach. The change is accompanied by documentation updates and a version bump to keep developer guidance and release metadata in sync.

Build and Asset Pipeline Fix:

  • Added the assets: ['resources/images/**'] option to the laravel() Vite plugin in vite.config.js so SVG icons are emitted into the build manifest, allowing Vite::asset('resources/images/icons/*.svg') to resolve at render time.
  • Without this option, the imagewize/theme-icon PHP callback returned null, window.imagewizeIcons values were empty, and every migrated icon block (icon-grid, feature-cards, trust-bar) rendered broken.

Documentation and Developer Guidance:

  • Updated CLAUDE.md and AGENTS.md to document the required Vite assets option as a critical step in the theme-icon binding pattern, preventing regressions in future icon work.
  • Recorded the fix and its rationale, referencing docs/nynaeve/THEME-ICON-BINDING-BROKEN.md for the full failure analysis.

Release Metadata:

  • Bumped the theme version to 2.15.3 in style.css, readme.txt, and CHANGELOG.md to reflect the fix.

Files Changed:

jasperf added 3 commits July 3, 2026 08:55
Add assets: ['resources/images/**'] to the laravel() plugin so static
SVG icons referenced only via Vite::asset() in the imagewize/theme-icon
binding get manifest entries. Without this, Vite::asset() throws and
icons render as broken images in the editor and frontend.
Add guidance to CLAUDE.md and AGENTS.md that vite.config.js must keep
the assets option for the theme-icon binding to work, and that SVGs
should never be imported (Vite hashes them into stale URLs).
@jasperf jasperf changed the title V2.15.3 imagewize/theme-icon Block Binding Fix Jul 3, 2026
@jasperf jasperf merged commit c8f0ac7 into main Jul 3, 2026
3 checks passed
@jasperf jasperf deleted the v2.15.3 branch July 3, 2026 01:59
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.

1 participant