Corrupted JPEG
A copy-paste glitch & distortion component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Glitch & DistortionHTMLCSSany framework
IMG_042
Copy into your project
HTML
<!-- Corrupted JPEG — a few macroblock-colored tiles briefly jitter into
view once per 5s cycle (a single short burst, not a repeating strobe),
then vanish, mimicking a compression-error frame. -->
<div class="nuda-gd2-jpeg-corrupt">
<span>IMG_042</span>
<span class="nuda-gd2-jpeg-corrupt__block" aria-hidden="true"></span>
<span class="nuda-gd2-jpeg-corrupt__block" aria-hidden="true"></span>
<span class="nuda-gd2-jpeg-corrupt__block" aria-hidden="true"></span>
<span class="nuda-gd2-jpeg-corrupt__block" aria-hidden="true"></span>
</div>CSS
.nuda-gd2-jpeg-corrupt {
position: relative;
display: grid;
place-items: center;
width: 160px;
aspect-ratio: 4/3;
border-radius: 10px;
overflow: hidden;
background: linear-gradient(135deg,#121216,#09090b);
color: #e4ff54;
font: 800 1rem/1 ui-monospace,SFMono-Regular,Menlo,monospace;
letter-spacing: .08em;
}
.nuda-gd2-jpeg-corrupt__block {
position: absolute;
width: 22%;
height: 18%;
opacity: 0;
animation: _nuda-gd2jpeg-corrupt 5s steps(1) infinite;
}
.nuda-gd2-jpeg-corrupt__block:nth-of-type(1) {
top: 20%;
left: 10%;
background: rgba(0,229,255,.32);
animation-delay: .3s;
}
.nuda-gd2-jpeg-corrupt__block:nth-of-type(2) {
top: 55%;
left: 60%;
background: rgba(255,0,212,.3);
animation-delay: .6s;
}
.nuda-gd2-jpeg-corrupt__block:nth-of-type(3) {
top: 65%;
left: 15%;
background: rgba(228,255,84,.28);
animation-delay: .15s;
}
.nuda-gd2-jpeg-corrupt__block:nth-of-type(4) {
top: 10%;
left: 65%;
background: rgba(0,229,255,.25);
animation-delay: .45s;
}
@keyframes _nuda-gd2jpeg-corrupt {
0%,90%,100% {
opacity: 0;
transform: translate(0,0);
}
92% {
opacity: 1;
transform: translate(3px,0);
}
94% {
opacity: 1;
transform: translate(-3px,2px);
}
96% {
opacity: 1;
transform: translate(2px,-2px);
}
98% {
opacity: 0;
transform: translate(0,0);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-gd2-jpeg-corrupt__block {
animation: none;
opacity: 0;
}
}
How to use Corrupted JPEG
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.