@mt-gulp/responsive
Version:
gulp responsive images with latest package dependencies working with node 12
20 lines (17 loc) • 340 B
JavaScript
;
var path = require('path');
module.exports = function(filePath) {
var extname = path.extname(filePath);
switch (extname) {
case '.jpeg':
case '.jpg':
case '.jpe':
return 'jpeg';
case '.png':
return 'png';
case '.webp':
return 'webp';
default:
return 'unsupported';
}
};