2019-05-23 19:40:39 +02:00

24 lines
348 B
Vue

<template>
<img
v-bind="imageProps"
:src="imageSrc"
>
</template>
<script>
export default {
props: {
imageProps: {
type: Object,
required: true,
},
},
computed: {
imageSrc() {
const src = this.imageProps.src
return src.startsWith('/') ? src.replace('/', '/api/') : src
},
},
}
</script>