emptygif
Idioma: Português

Todas as linguagens e frameworks

HTML <img> with a data: URI HTML

Um snippet em HTML para HTML <img> with a data: URI que responde às requisições para /pixel.gif com o GIF vazio, decodificado uma única vez na inicialização.

HTML <img> with a data: URI HTML

Arquivo
index.html
<!-- Inline transparent spacer / placeholder: no extra HTTP request -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" width="1" height="1" alt="">

Executamos este snippet e comparamos os bytes que ele retornou.

Site oficial: HTML <img> with a data: URI

Mais em HTML