I want to make a component that gets a String prop with the name of the image
<script setup>
const props = defineProps({
image: String,
}
)
</script>
I tried using the required function as solution given in nuxt but this doesnt work in nuxt 3 and i cant find an alternative
<div class="col-4 h-100 text-center">
<h1>Picture</h1>
<img :src="require(`../assets/${image}.jpg`)" />
</div>
I only tried using a normal src attribute to test if it can find the image and that works.