0๐
โ
A work around was adding an img
to the template so it is rendered on creation and then getElementById
.
<template>
...
<img id="YOUR_ID" src="@/PATH/IMG_NAME.png" style="display: none;"/>
...
</template>
and then fetching it using a const image = document.getElementById('YOUR_ID')
.
Source:stackexchange.com