mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
plugins/removeRasterImages: add gif format
This commit is contained in:
@ -15,7 +15,7 @@ exports.removeRasterImages = function(item) {
|
|||||||
if (
|
if (
|
||||||
item.isElem('image') &&
|
item.isElem('image') &&
|
||||||
item.hasAttr('xlink:href') &&
|
item.hasAttr('xlink:href') &&
|
||||||
/(\.|image\/)(jpg|png)/.test(item.attr('xlink:href').value)
|
/(\.|image\/)(jpg|png|gif)/.test(item.attr('xlink:href').value)
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<g>
|
<g>
|
||||||
<image xlink:href="raster.jpg" width="100" height="100"/>
|
<image xlink:href="raster.jpg" width="100" height="100"/>
|
||||||
<image xlink:href="raster.png" width="100" height="100"/>
|
<image xlink:href="raster.png" width="100" height="100"/>
|
||||||
|
<image xlink:href="raster.gif" width="100" height="100"/>
|
||||||
<image xlink:href="raster.svg" width="100" height="100"/>
|
<image xlink:href="raster.svg" width="100" height="100"/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 372 B |
@ -2,6 +2,7 @@
|
|||||||
<g>
|
<g>
|
||||||
<image xlink:href="data:image/jpg;base64,..." width="100" height="100"/>
|
<image xlink:href="data:image/jpg;base64,..." width="100" height="100"/>
|
||||||
<image xlink:href="data:image/png;base64,..." width="100" height="100"/>
|
<image xlink:href="data:image/png;base64,..." width="100" height="100"/>
|
||||||
|
<image xlink:href="data:image/gif;base64,..." width="100" height="100"/>
|
||||||
<image xlink:href="data:image/svg+xml;base64,..." width="100" height="100"/>
|
<image xlink:href="data:image/svg+xml;base64,..." width="100" height="100"/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 436 B |
Reference in New Issue
Block a user