Troy-Yang / hexo-lazyload-image

lazyload image plugin for Hexo.
https://www.npmjs.com/package/hexo-lazyload-image
MIT License
82 stars 10 forks source link

fix: update base64 image regex #56

Open mark0smith opened 4 days ago

mark0smith commented 4 days ago

This commit contains following changes in lib/third-party-fix.js:

  1. update base64ImgRegex to match image MIME types. As in NPM package source code, default imge is data:image/svg+xml;base64,P which original regex doesn't match;
  2. use imgRegex.test(parentNode.href) to get a boolean result in if condition.