build

Drupal srcset in static HTML pages: gulp asset build pipeline

Client has a bunch of static landing pages that are mobile-friendly and need to remain that way.

But what is to be done about srcset? Read on, oh reader, for the solution.

First, I created a gulp build task which makes a bunch of different sizes.

Install dependencies like this:
npm install -D gulp-load-plugins gulp-responsive sharp

The task looks like this:

Subscribe to build