Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

245
Views
Vue.js & Laravel - New Image file cannot be loaded but the older image can

I'm working on a Vue.js and Laravel project where the Vue is inside the resources/js directory of the Laravel project.

I'm having a problem with loading an image that I just put inside the resources/js/assets directory. I'm using a template so there are few images inside the folder already, and when I tried to load a new image file that I just put, the image won't be loaded. But when I tried to load the other image (which is the older image inside the directory) the image showed up. I'm trying to add the image as the background image of the page. Here is my code to do it.

HTML:

<div class="page-header align-items-start min-vh-100" :style="{ backgroundImage: 'url(' + bgImage + ')' }">

Vue (JS):

export default {
    name: "login",
    data() {
        return {
            bgImage: "/assets/img/office-dark.jpg"
        };
    }

I tried every new image file and that is when the problem occurred (no errors, the image just won't be loaded). The old image files are okay. Any suggestions?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

have a look here, often require is a good choice.

Link: Vue.js data-bind style backgroundImage not working

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!