@asset() in Blade template render wrong directory

Hello !

I want to use images in my Sage 10 project.

I put them all in the resources/images folder and when compiling they copy well to the public/assets/images folder.

But when I want to use them in a blade template with @assets('images/logo.svg'), it doesn’t work:

/public/images/logo.svg

instead of

/public/images/assets/logo.65fe3a.svg

Has anyone ever encountered this problem? Or do you know of alternatives?
Thanks for your help !

You can follow that issue here: Bug: Sage `@asset` directive incompatible with the dist output · Issue #897 · roots/bud · GitHub

Temporary workaround
@asset(‘assets/images/example.jpg’)

1 Like