Open shaoner opened 10 years ago
This is a showstopper for me. I have this is my css:
background-image: url('data:image/svg+xml;base64,PD94bWwgdm ...
and it gets rewritten:
background-image: url('//cdn.example.com/svg+xml;base64,PD94bWwgdm ...
open a pull request and I'll merge it and publish to NPM
Hi,
It seems that uri like:
<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA .... ">
are not currently supported, it just replaces "data:image" with the cdn url because it is not detected in the splitter and because of the url.parse line in _replace method . Note that this also stands for link, script, url, etc. I would have opened a pull request, but I'm not sure how you want to handle such a case:For now I've been using ignorePath to handle that, and this works:
Not completely sure the regex handles all cases. Anyway, let me know if you want me to open a pull request.