Skip to content


Image resources

Get an image from Unsplash

Bookmarklet to lint images


Can transform images on the go by updating the URL

I personally don't use it to the fullest on my portfolio site

Cloudinary and Next.JS

Image formats


Using Modern Image Formats: AVIF And WebP — Smashing Magazine


  • go-to image format
  • replaces JPEG, PNG, GIF
    • animation
    • alpha transparency
    • lossy or lossless
  • Good support since 2022
  • better compression for photograph pictures than WebP


  • more support than AVIF
  • faster encode/decoding than AVIF

Progressive enhancement

 <source srcset="img/photo.avif" type="image/avif">
 <source srcset="img/photo.webp" type="image/webp">
 <img src="img/photo.jpg" alt="Description" width="360" height="240">

Can't use AVIF nor WebP

  • MozJPEG (optimize JPEG images)
  • OxiPNG (non-photographic images)
  • JPEG 2000 (lossy or lossless photographic images)

AVIF vs WebP

Display different images depending on light/dark mode

probably the picture element

Last update: 2023-04-24