Skip to content

Commit

Permalink
fix: skip downloading image when src starts with data:
Browse files Browse the repository at this point in the history
to support base64 encoded uri
  • Loading branch information
yumetodo committed Mar 7, 2020
1 parent ee5267c commit 166e2f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/image-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class ImageManager {
/** @type {Set<string>} */
const imageList = this.imageListMap[itemId][identifier] || new Set();
for (const imageUrl of imageUrls) {
if (imageUrl == null || !isURI(imageUrl)) continue;
if (imageUrl == null || !isURI(imageUrl) || imageUrl.startsWith("data:")) continue;
if (!isDryRun) this.NotifyCacheImage_(imageUrl, `${itemId}/${identifier}`);
imageList.add(imageUrl);
}
Expand Down

0 comments on commit 166e2f2

Please sign in to comment.