Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Buidling with grunt: grunt-rev task changes my images by adding a random hash and thus prevents my html from identify them

This is my html:

     <img src="../images/zulazlogo.png" alt="image1" >

However after running grunt build the image name is:

5cadd58e.zulazlogo.png

This is due to the grunt-rev task.

is there a way to tweak the html to include a build statement to change the file according to the new name? something like:

<img src="../images/@@hashzulalogo.png" alt="image1">
like image 964
zeevj Avatar asked Nov 02 '22 09:11

zeevj


1 Answers

Have you tried commenting out the grunt-rev images sections?

rev: {
  dist: {
    files: {
      src: [
        '<%= yeoman.dist %>/scripts/{,*/}*.js',
        '<%= yeoman.dist %>/styles/{,*/}*.css',
//            '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
        '<%= yeoman.dist %>/styles/fonts/*'
      ]
    }
  }
}
like image 199
Guy Avatar answered Nov 12 '22 19:11

Guy