Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Laravel Asset HelperNew to Visual Studio Code? Get it now.
Laravel Asset Helper

Laravel Asset Helper

Amirhossein Imani

|
3 installs
| (0) | Free
Automatically converts local Laravel Blade theme asset paths into asset() references.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Laravel Asset Helper

A VS Code extension for Laravel Blade theme assets.

When you install a pre-built HTML theme into a Laravel project, its assets often look like:

<link rel="stylesheet" href="/css/app.css">
<script src="js/app.js"></script>

Laravel expects public assets to be referenced with asset():

<link rel="stylesheet" href="{{ asset('client/css/app.css') }}">
<script src="{{ asset('client/js/app.js') }}"></script>
<img src="{{ asset('client/images/logo.svg') }}">

Usage

  1. Open a .blade.php file.
  2. Open the VS Code Command Palette.
  3. Run Laravel Asset Helper: Link Theme Assets.
  4. Enter the public folder prefix.

For example, if your files are:

public/
└── client/
    ├── css/
    ├── js/
    └── images/

enter:

client

If the assets are directly under public/, just press Enter without entering a prefix.

What it changes

The extension targets static asset attributes in:

  • <link href="...">
  • <script src="...">
  • <img src="https://github.com/Amirhossein-77/laravel-asset-helper/raw/HEAD/...">
  • <source src="...">
  • <video src="https://github.com/Amirhossein-77/laravel-asset-helper/raw/HEAD/...">
  • <video poster="...">
  • <audio src="...">
  • <track src="...">
  • <input src="...">

It intentionally does not rewrite normal <a href="..."> links because those are normally Laravel/application routes rather than static assets.

Ignored URLs

These are left unchanged:

  • http://...
  • https://...
  • //cdn.example.com/...
  • data:...
  • blob:...
  • mailto:...
  • tel:...
  • javascript:...
  • #...
  • existing asset(...) references
  • Blade/PHP/expression-based values
  • paths without a recognized static-asset extension

Development

npm install
npm run compile

To build a VSIX:

npm run package

Then install the generated .vsix through VS Code's Extensions: Install from VSIX... command.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft