Vue single-file component Vue
A Vue snippet for Vue single-file component that answers requests for /pixel.gif with the empty GIF, decoded once at startup.
Vue single-file component Vue
<script setup>
const EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';
defineProps({
width: { type: Number, default: 1 },
height: { type: Number, default: 1 },
});
</script>
<template>
<img :src="EMPTY_GIF" :width="width" :height="height" alt="" aria-hidden="true">
</template>
We ran this snippet and compared the bytes it returned.