Solved 74 views

What is the best way to handle local image paths in Laravel Blade templates?

When refactoring an older website, how should I link to local thumbnail images stored directly on the server without breaking relative paths?

U
UX_Designer
asked 1mo ago · 10 rep

1 Answer(s)

0
Always use Laravel's native asset() helper function in your Blade templates: <img src=\{{ asset('images/thumbnail.jpg') }}\">. This automatically generates the correct absolute URL based on your application's root directory."""
P
PixelPerfect answered 1mo ago

Your Answer