diff --git a/interface/resources/snapshot/img/no-image.jpg b/interface/resources/snapshot/img/no-image.jpg
new file mode 100644
index 0000000000..fff41c4e54
Binary files /dev/null and b/interface/resources/snapshot/img/no-image.jpg differ
diff --git a/scripts/system/html/js/SnapshotReview.js b/scripts/system/html/js/SnapshotReview.js
index 6c5829d64f..2a4d535fee 100644
--- a/scripts/system/html/js/SnapshotReview.js
+++ b/scripts/system/html/js/SnapshotReview.js
@@ -293,19 +293,25 @@ function addImage(image_data, isLoggedIn, canShare, isGifLoading, isShowingPrevi
isGif = img.src.split('.').pop().toLowerCase() === "gif";
imageContainer.appendChild(img);
document.getElementById("snapshot-images").appendChild(imageContainer);
- paths.push(image_data.localPath);
- if (isGif) {
- imageContainer.innerHTML += 'GIF';
- }
- if (!isGifLoading) {
- appendShareBar(id, isLoggedIn, canShare, isGif, blastButtonDisabled, hifiButtonDisabled, canBlast);
- }
- if (!isGifLoading || (isShowingPreviousImages && !image_data.story_id)) {
- shareForUrl(id);
- }
- if (isShowingPreviousImages && isLoggedIn && image_data.story_id) {
- updateShareInfo(id, image_data.story_id);
- }
+ img.onload = function () {
+ paths.push(image_data.localPath);
+ if (isGif) {
+ imageContainer.innerHTML += 'GIF';
+ }
+ if (!isGifLoading) {
+ appendShareBar(id, isLoggedIn, canShare, isGif, blastButtonDisabled, hifiButtonDisabled, canBlast);
+ }
+ if (!isGifLoading || (isShowingPreviousImages && !image_data.story_id)) {
+ shareForUrl(id);
+ }
+ if (isShowingPreviousImages && isLoggedIn && image_data.story_id) {
+ updateShareInfo(id, image_data.story_id);
+ }
+ };
+ img.onerror = function () {
+ img.onload = null;
+ img.src = image_data.errorPath;
+ };
}
function showConfirmationMessage(selectedID, destination) {
if (selectedID.id) {
diff --git a/scripts/system/snapshot.js b/scripts/system/snapshot.js
index 4c661482fc..1c257cfed5 100644
--- a/scripts/system/snapshot.js
+++ b/scripts/system/snapshot.js
@@ -273,7 +273,8 @@ function fillImageDataFromPrevious() {
localPath: previousStillSnapPath,
story_id: previousStillSnapStoryID,
blastButtonDisabled: previousStillSnapBlastingDisabled,
- hifiButtonDisabled: previousStillSnapHifiSharingDisabled
+ hifiButtonDisabled: previousStillSnapHifiSharingDisabled,
+ errorPath: Script.resolvePath(Script.resourcesPath() + 'snapshot/img/no-image.jpg')
});
}
if (previousAnimatedSnapPath !== "") {
@@ -281,7 +282,8 @@ function fillImageDataFromPrevious() {
localPath: previousAnimatedSnapPath,
story_id: previousAnimatedSnapStoryID,
blastButtonDisabled: previousAnimatedSnapBlastingDisabled,
- hifiButtonDisabled: previousAnimatedSnapHifiSharingDisabled
+ hifiButtonDisabled: previousAnimatedSnapHifiSharingDisabled,
+ errorPath: Script.resolvePath(Script.resourcesPath() + 'snapshot/img/no-image.jpg')
});
}
}