File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 55 <div class =" card mb-4 box-shadow" >
66
77 <!-- Display Image -->
8- <img @click =" onImageClick" :src =" imageUrl" class =" card-img-top" style =" width : 100% ; display : block ;" >
8+ <img @click =" onImageClick" :src =" imageUrl" class =" card-img-top" @error = " imageError = true " style =" width : 100% ; display : block ;" >
99
1010 <!-- Card Body -->
1111 <div class =" card-body" >
@@ -157,9 +157,11 @@ export default {
157157 },
158158 data () {
159159 return {
160+ imageError: false ,
160161 selectedCategories: [],
161162 defaultMetadata: this .dataset .default_annotation_metadata ,
162163 noImageUrl: require (" @/assets/no-image.png" ),
164+ notFoundImageUrl: require (" @/assets/404-image.png" ),
163165 sharedUsers: this .dataset .users
164166 };
165167 },
@@ -229,11 +231,14 @@ export default {
229231 return 100 * (this .dataset .numberAnnotated / this .dataset .numberImages );
230232 },
231233 imageUrl () {
234+ if (this .imageError ) {
235+ return this .notFoundImageUrl ;
236+ }
232237 if (this .dataset .numberImages > 0 ) {
233238 return " /api/image/" + this .dataset .first_image_id + " ?width=250" ;
234- } else {
235- return this .noImageUrl ;
236239 }
240+
241+ return this .noImageUrl ;
237242 },
238243 listCategories () {
239244 let list = [];
You can’t perform that action at this time.
0 commit comments