source: frontend/node_modules/svgo/plugins/removeRasterImages.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 558 bytes
RevLine 
[9af201e]1'use strict';
2
3exports.type = 'perItem';
4
5exports.active = false;
6
7exports.description = 'removes raster images (disabled by default)';
8
9/**
10 * Remove raster images references in <image>.
11 *
12 * @see https://bugs.webkit.org/show_bug.cgi?id=63548
13 *
14 * @param {Object} item current iteration item
15 * @return {Boolean} if false, item will be filtered out
16 *
17 * @author Kir Belevich
18 */
19exports.fn = function(item) {
20
21 if (
22 item.isElem('image') &&
23 item.hasAttrLocal('href', /(\.|image\/)(jpg|png|gif)/)
24 ) {
25 return false;
26 }
27
28};
Note: See TracBrowser for help on using the repository browser.