Recreates JPEG block edges, ringing, and color bleed to give an image a visibly compressed look.
Also known as: CompressionArtifactsJPEG artifactsJPEG compression
Moves in browsers that support WebGPU
This device could not render the demo — showing a still
Code reflects the control values
React
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
import { Shader, CompressionArtifacts, ImageTexture } from 'shaders/react'
export default function ShaderEffect() {
return (
<Shader style={{ width: '100%', height: 320 }} disableTelemetry>
<ImageTexture
objectFit="cover"
url="/samples/photo.jpg" />
<CompressionArtifacts />
</Shader>
)
}
Vue
<!-- Renders only in browsers with WebGPU. -->
<!-- /samples/… are this site’s sample files — point them at your own image or video. -->
<script setup lang="ts">
import { Shader, CompressionArtifacts, ImageTexture } from 'shaders/vue'
</script>
<template>
<Shader style="width: 100%; height: 320px" :disable-telemetry="true">
<ImageTexture
object-fit="cover"
url="/samples/photo.jpg"/>
<CompressionArtifacts/>
</Shader>
</template>
Svelte
<!-- Renders only in browsers with WebGPU. -->
<!-- /samples/… are this site’s sample files — point them at your own image or video. -->
<script>
import { Shader, CompressionArtifacts, ImageTexture } from 'shaders/svelte'
</script>
<Shader style="width: 100%; height: 320px" disableTelemetry>
<ImageTexture
objectFit="cover"
url="/samples/photo.jpg" />
<CompressionArtifacts />
</Shader>
Solid
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
import { Shader, CompressionArtifacts, ImageTexture } from 'shaders/solid'
export default function ShaderEffect() {
return (
<Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
<ImageTexture
objectFit="cover"
url="/samples/photo.jpg" />
<CompressionArtifacts />
</Shader>
)
}
JavaScript
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
// expects <canvas id="canvas" style="width:100%;height:320px"></canvas> on the page
import { createShader } from 'shaders/js'
const shader = await createShader(document.getElementById("canvas"), {
components: [
{
type: 'ImageTexture',
props: {
objectFit: 'cover',
url: '/samples/photo.jpg',
},
},
{
type: 'CompressionArtifacts',
}
]
}, { disableTelemetry: true })
Props · CompressionArtifacts
Changes apply to the demo above and to the code tabs. Descriptions come from the library registry (MIT).
Name
Value
Default
Range / options
Description
qualityQuality
12
1 – 100 (step 1)
JPEG quality (1 = heavily destroyed, 100 = near lossless)
Every component also takes blendMode · opacity · visible · maskSource/maskType · boundingBox · id
It makes a clean picture look as though it has been saved repeatedly at low quality, revealing blocks and ringing around edges. The effect makes the traces of a degraded transfer visible on purpose.
This entry has one control: `quality`. It defaults to 12 and ranges from 1 to 100; lower values make compression damage harsher and more visible, while higher values stay closer to the source.
Place an image or video layer below it. Combine it with `DataMosh` or `Glitch` for damaged-footage styling, but avoid it for archival originals or images where fine text and lines matter.
When to use
Use it to evoke low-quality web images, aged footage, or deliberate data damage. Avoid it when preserving source quality or showing fine text is important.