nothingworks/blade-svg
A Laravel package for inlining SVG files directly in Blade templates. Use the @svg directive to embed icons and graphics with custom attributes and classes, plus caching for performance. Manage and style SVGs with CSS without extra HTTP requests.
Package identity is the first technical risk. The supplied metadata is internally inconsistent: the package name nothingworks/blade-svg points to a lightweight Blade directive that inlines SVG files from a configured path, while the repository URL, star count (2,490), description, and release cadence all describe blade-ui-kit/blade-icons — a different, larger project with a Composer-installable icon-set ecosystem and <x-icon-*> components. The "0 dependents" figure also conflicts with a 2,490-star package, suggesting the dependency graph was not resolved. Adoption cannot proceed until the TPM confirms which artifact is actually being approved; the two have different APIs, config surfaces, and upgrade paths.
Architecture fit. Both candidates occupy the same layer: a Blade-level abstraction that replaces {!! file_get_contents(...) !!} calls, icon-font markup, or hand-pasted SVG with a directive or component. That is a good fit for a Laravel monolith or a Blade/Inertia front end. Neither touches the database, queue, or auth layers, so the blast radius is confined to the view layer and the build pipeline. blade-icons is the more opinionated option: it treats icon sets as separate Composer packages, which buys governance and versioning but adds dependency sprawl. blade-svg is a thinner wrapper with fewer moving parts.
Integration feasibility. Straightforward. composer require, optionally publish the config, register one or more icon paths, and start using the directive/component in templates. The real work is not installation but the inventory and migration of existing icon usage. Compatibility must be confirmed against the project's Laravel and PHP version matrix, and against any CSS purge step — inline SVG changes how Tailwind/Vite tree-shaking behaves relative to icon fonts.
Technical risk.
aria-hidden/role="img"/<title> handling, which the package will not enforce for you.Key questions to resolve before approval.
style-src/img-src, and do we inline SVG or reference sprites?Stack fit. Strong for a server-rendered Laravel application, including Livewire and Inertia+Blade hybrids. Weak-to-neutral for a fully decoupled SPA where the front end owns its own icon system — in that case this package solves a problem the front end does not have, and standardizing on it would fragment the icon strategy across two codebases.
Migration path. Treat this as a view-layer refactor, not a dependency install:
<svg>, file_get_contents, and existing partials.Compatibility. Confirm the Laravel/PHP support matrix against the project's actual versions, and check whether the package's Blade component namespace collides with anything already registered. Validate that the CSS pipeline does not purge classes the package relies on. If the project uses a design-system package that already ships icons, prefer extending that over introducing a second source of truth.
Sequencing.
Do not sequence the cleanup before the migration is verified; keeping both paths live temporarily is cheaper than a rollback.
Maintenance. Low ongoing effort in the steady state — the package surface is small and the usage pattern is declarative. The dominant maintenance cost is the internal wrapper and icon inventory, both of which are yours regardless of vendor. Pin the version, treat upgrades as routine dependency bumps, and add a smoke test that renders a page containing several icons so a broken upgrade fails CI rather than production. Budget for the possibility of forking or replacing the vendor package if the single-maintainer risk materializes; the wrapper component is what makes that a contained change.
Support. Ownership should sit with the platform or design-system team, not individual feature teams. Required artifacts: naming convention doc, accessibility convention (decorative vs. meaningful icons), and a short "adding an icon" runbook. Without these, icon directories accumulate duplicates and inconsistent sizing within a quarter.
Scaling. No database, queue, or concurrency implications. The scaling concerns are payload and I/O:
Failure modes to instrument.
Ramp-up. Low. A Laravel developer familiar with Blade can be productive in under an hour; the full convention set (naming, sizing, accessibility, color via currentColor) takes roughly a day to internalize. The real onboarding cost is the migration tooling and the inventory, which is a one-time platform investment. Expect a two- to three-week elapsed effort for a mid-sized application, most of it mechanical view editing rather than technical risk.
How can I help you explore Laravel packages today?