I'm trying to create an image on the fly without saving and sending to the Vue but I can't get to display.
in Laravel
$img = Image::make('image-path')->resize(400, 400);
$img->text('name', 205, 138, function($font) {
$font->file('fonts/BostonHeavy.woff');
$font->size(42);
$font->color('#ffffff');
$font->align('center');
$font->valign('top');
});
return $img->response('jpg');
in Vue
data () {
return {
image: null
}
},
methods: {
async fetchData (param) {
this.image = await this.$axios.$get(`image`)
}
}
in template
{{image}}
or
<img :src="image" />
always displays broken, though testing on Postman it works