Converting and Optimizing Images From the Command Line

Images take up to 50% of the total size of an average web page. And if images are not optimized, users end up downloading extra bytes. And if they’re downloading extra bytes, the site not only takes that much more time to load, but users are using more data, both of which can be resolved, at least in part, by optimizing the images before they are downloaded.

In this tutorial, you’ll learn to write bash scripts that create and optimize images in different image formats, targeting the most common formats, including JPG, PNG, WebP, and SVG.

Read the full blog on CSS Tricks.

Thanks for reading 💜

I publish a monthly newsletter in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev-related posts which I across while surfing on the web.

Connect with me through TwitterLinkedInGithub or send me an Email.

Ravgeet, Full Stack Developer and Technical Content Writer

--

--

--

Software Engineer at CloudAnswers / Full Stack Developer / Technical Content Writer / React, Vue, Flutter, Laravel, Node, Strapi, Python / Visit ravgeet.in

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The beginning of the FrontPoint DeFi is just around the corner. Check the Homepage and WhitePaper.

Organizing Components and State

Build a map of NYC’s police precincts with React & D3, Part 1

What are the key benefits of ReactJS development?

Faking Some Of The Back End

How I Set a Default Profile Picture for My User using Active Storage, or How to Convert a Local…

Beginners Guide to React.js (Part 2)

Serverless Twitter Bot with AWS CDK

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ravgeet Dhillon

Ravgeet Dhillon

Software Engineer at CloudAnswers / Full Stack Developer / Technical Content Writer / React, Vue, Flutter, Laravel, Node, Strapi, Python / Visit ravgeet.in

More from Medium

Slow Computer? Windows Headaches? 13 Reasons To Try Linux

A person with a pained expression and one hand on their head sits in front of a laptop. People in the background discuss some documents.

Copying files to and from remote server using ssh

type in terminal: man scp

How To Automate Connect, Generate And Add An SSH Key To A Server

Install minikube on Ubuntu 22.04 / 20.04 LTS

Install kubectl in ubuntu