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

106
Views
Pictures not showing in gulp build

I have a gulp build, everything works fine, but after the build, some images are not loaded and are not displayed because the paths are different, for this I installed gulp-replace. The paths have been successfully replaced, this can be seen in the final code. But the image is not showing on the page.

And every time when I start the assembly, the picture that was missing may appear in the new assembly, but another one will be missing

What's wrong with my build?

Link to my gulp code

enter image description here enter image description here enter image description here

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

0

The problem was in const cleanCSS = require("gulp-clean-css");

As I did not try to rearrange the line with renaming, nothing happened. In the minified file, the paths remain from the src parp. Temporarily removed minification

//Таск для обработки стилей
gulp.task("styles", () => {
 
  return (
    gulp
      .src(styleFiles)
      .pipe(sourcemaps.init())
    
      .pipe(less())

      .pipe(concat("style.css"))
      .pipe(replace('url("../img/', 'url("./../img/'))
     
      .pipe(
        autoprefixer({
          overrideBrowserslist: ["last 2 versions"],
          cascade: false,
        })
      )

      .pipe(sourcemaps.write("./"))
      .pipe(gulp.dest("./build/css"))
      .pipe(browserSync.stream())
  );
});

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!