grunt copy - Couldn't load the png image

272 Views Asked by At

I am new to grunt. I am copying the src folder to build by running the command grunt copy. But I can't open all png images in the build folder(destination folder). I got a fatal error while trying to open the image. Errors: "Could not load image" "Fatal Error reading PNG image file: Not a PNG file"

Grunt versions I am using: grunt-cli v1.2.0, grunt v0.4.5, [email protected].

I have tried with all available links in stack overflow and other sites.

Kindly help me.

1

There are 1 best solutions below

0
Surya Raj M On BEST ANSWER

I got the answer;

I've done few modifications in the gruntfile.js:

  • Added grunt.loadNpmTasks('grunt-contrib-copy'); to the end of gruntfile.js.
  • Modified the options like the following:

    options: { punctuation: '' }