diff --git a/client/src/assets/404-image.png b/client/src/assets/404-image.png new file mode 100644 index 00000000..a4d64381 Binary files /dev/null and b/client/src/assets/404-image.png differ diff --git a/client/src/components/cards/DatasetCard.vue b/client/src/components/cards/DatasetCard.vue index bbffb7cb..2111de5f 100755 --- a/client/src/components/cards/DatasetCard.vue +++ b/client/src/components/cards/DatasetCard.vue @@ -5,7 +5,7 @@
- +
@@ -157,9 +157,11 @@ export default { }, data() { return { + imageError: false, selectedCategories: [], defaultMetadata: this.dataset.default_annotation_metadata, noImageUrl: require("@/assets/no-image.png"), + notFoundImageUrl: require("@/assets/404-image.png"), sharedUsers: this.dataset.users }; }, @@ -229,11 +231,14 @@ export default { return 100 * (this.dataset.numberAnnotated / this.dataset.numberImages); }, imageUrl() { + if (this.imageError) { + return this.notFoundImageUrl; + } if (this.dataset.numberImages > 0) { return "/api/image/" + this.dataset.first_image_id + "?width=250"; - } else { - return this.noImageUrl; } + + return this.noImageUrl; }, listCategories() { let list = [];