Support the ongoing development of Laravel.io →
JavaScript Laravel

It's a simple set up:

#canvas { display: block; background-color: blue; }

<canvas id="canvas"  width = "200" height = "200"  ></canvas>

<script >
var canvas = document.getElementById('canvas');
setTimeout(() => {
var dataURL = canvas.toDataURL();
console.log(dataURL);
}, 3000);
</script>

I use a https://base64.guru/converter/decode/image to test URL, but even canvas.toBlog() also returns black

I just update Laravel and computer sw this month. Hoping someone has some ideas..

Last updated by @charliesideroad 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.