DEV Community

Cover image for Image optimization for web
Manish Gopal Singh
Manish Gopal Singh

Posted on • Updated on

Image optimization for web

What is Image optimization?

The goal of image optimization is to create high-quality images with the lowest file size without lossing quality. It's the process of minimizing web page load time without losing significant quality by putting images into right size, dimension, resolution and format.

Why do we need to optimize image?

  • To improve page load times.
  • For better browsing experience.
  • To improve SEO.

How to optimize image?

  • Resize your images - use crop size image instead of original image
  • Use lazy loading
  • Compress image using commandline tool (convert / jpegoptim) or online tool - https://tinyjpg.com/
  • Use content delivery network like cloudflare, Amazon CloudFront etc
  • Enable gzip compression on server

Top comments (1)

Collapse
 
premento profile image
Premento

Convert image to webp.