Support the ongoing development of Laravel.io →
posted 8 months ago
Laravel

Hello,

I'm working on a Laravel project and using Vite for asset management. I have a situation where the logo image is stored in the resources folder, while the demo images are kept in the public folder. I want to set a background image in a CSS file located in resources, but the image itself is in the public folder.

How can I configure the CSS file to correctly load the background image from the public folder when using Vite?

Thanks for your help!

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Mohsen Movahed bidak Joined 30 Sep 2021

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.