Sha256: e28b33b6c1c47d8e0202f70e7c8e4869c79c6a20f9fb5fa6f6094c7090773824

Contents?: true

Size: 558 Bytes

Versions: 34

Compression:

Stored size: 558 Bytes

Contents

'use strict';

exports.type = 'perItem';

exports.active = false;

exports.description = 'removes raster images (disabled by default)';

/**
 * Remove raster images references in <image>.
 *
 * @see https://bugs.webkit.org/show_bug.cgi?id=63548
 *
 * @param {Object} item current iteration item
 * @return {Boolean} if false, item will be filtered out
 *
 * @author Kir Belevich
 */
exports.fn = function(item) {

    if (
        item.isElem('image') &&
        item.hasAttrLocal('href', /(\.|image\/)(jpg|png|gif)/)
    ) {
        return false;
    }

};

Version data entries

34 entries across 31 versions & 11 rubygems

Version Path
ezii-os-5.2.1 node_modules/svgo/plugins/removeRasterImages.js
ezii-os-2.0.1 node_modules/svgo/plugins/removeRasterImages.js
ezii-os-1.1.0 node_modules/svgo/plugins/removeRasterImages.js
ezii-os-1.0.0 node_modules/svgo/plugins/removeRasterImages.js
ezii-os-0.0.0.1.0 node_modules/svgo/plugins/removeRasterImages.js
ezii-os-0.0.0.0.1 node_modules/svgo/plugins/removeRasterImages.js
optimacms-0.4.3 spec/dummy/node_modules/svgo/plugins/removeRasterImages.js
optimacms-0.4.2 spec/dummy/node_modules/svgo/plugins/removeRasterImages.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/svgo/plugins/removeRasterImages.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/postcss-svgo/node_modules/svgo/plugins/removeRasterImages.js
locomotivecms-3.4.0 app/javascript/node_modules/postcss-svgo/node_modules/svgo/plugins/removeRasterImages.js
locomotivecms-3.4.0 app/javascript/node_modules/svgo/plugins/removeRasterImages.js
cortex-0.1.3 spec/dummy/node_modules/svgo/plugins/removeRasterImages.js
lanes-0.8.0 node_modules/svgo/plugins/removeRasterImages.js