0

I'm running into issues with the Grunt responsive_images_extender.

None of my srcset are set up in the build folder.

According to the readme documentation, it says that the default task code will set up the srcset directly from the image sizes created from the first responsive_images task. (which in my scenario adds 3img sizes in the build folder)

Although when I run it through the terminal with the following default config code:

grunt.initConfig({
  responsive_images_extender: {
    target: {
      options: {},
      files: [{
        expand: true,
        src: ['**/*.{html,htm,php}'],
        cwd: 'src/',
        dest: 'build/'
      }]
    }
  }

});

it doesn't work. I know that the html files do get processed as they show up in the build folder when I run the task. The terminal output also tells me they have been processed:

Running "responsive_images_extender:target" (responsive_images_extender) task
>> Processed 157 <img> tags

Am I misinterpreting the documentation and still need to do more configuring? Any feedback will be greatly appreciated.

Jonathan002
  • 9,639
  • 8
  • 37
  • 58

1 Answers1

0

After reviewing the project I was working on, I realized that it was the cwd: that was the problem as the build folder is on the same level as the src folder. It was reading the img from the wrong folder. There is no problem now as I moved around my tasks so that it reads it in the right folder. Sorry if this wasted anyones time. : )

Jonathan002
  • 9,639
  • 8
  • 37
  • 58