| Format | PNG | JPEG | GIF |
| Size* | 848K | 98K | 270K |
| Transparency? | ✅ | ❌ | ✅* |
| Encoding | Lossless | Lossy | Lossless* |
*) milage may vary, depending on type of image!
| Format | PNG | JPG | WebP | HEIF |
| Size | 1300K | 829K | 129K | 248K |
| Encoding | Lossless | Lossy | Either | Lossy |
| Transparency | ✅ | ❌ | ✅ | ✅ |
| Optimized for | Quality | Size | Size | Quality |
<picture> + srcset
<picture>
<source media="(max-width: 799px)" srcset="dog-300w.jpg">
<source media="(min-width: 800px)" srcset="dog-800w.jpg">
<img src="dog-800w.jpg" alt="A very cute dog">
</picture>
srcset + sizes
<img
srcset="dog-320w.jpg 320w,
dog-480w.jpg 480w,
dog-800w.jpg 800w"
sizes="(max-width: 320px) 280px,
(max-width: 480px) 440px, 800px"
src="dog-800w.jpg" alt="A very cute dog">
mozjpeg -outfile minified.jpg original.png
optipng -out minified.png original.png
Combines the previous tools in a Webpack Loader
npm install img-loader
89 50 4E 47 0D 0A 1A 0A .. ..
89 50 4E 47 0D 0A 1A 0A .. ..
Layer 1: 255 000 128
Layer 2: 000 255 128
Output: ??? ??? ???
Layer 1: 255 000 128
Layer 2: 000 255 128
Output: 255 255 128
Compositing is running shaders with all layers as input

Compositing is running shaders with all layers as input

Source
A * B
rgb(10, 200, 50)
rgb(150, 100, 150)
----------------
rgb(10, 100, 50)
See the Pen Cross-browser filter effects by Amelia Bellamy-Royds (@AmeliaBR) on CodePen.
mp4: 3.5 MB
webm: 1.3 MB
<video>
<source src="src/video.mp4"
type='video.mp4;
codecs="avc1.42E01E, mp4a.40.2"'/>
<source src="src/video.webm"
type='video.webm;
codecs="vp8, vorbis"'/>
</video>