Posted in Laravel Help
Laravel 10 Display Image in Blade File
It’s the best option for Laravel 10 Display Image in Blade File than before, it’s the good way to display image in Laravel 10 blade with vite.
New Laravel version or Laravel 10 comes with Vite default or installed default.
So you need to insert images with Vite and asset etc.
Before the insert image, you need to make sure taht you included right way to style and js with vite. [Fixed] Laravel 10 Include CSS & JS with Vite
then you can follow this.
<img src="{{Vite::asset('resources/backend/assets/img/avatars/1.png')}}
You need to use resources then add inside folders or directives like css, js, admin, backend, etc.
Thanks.