How to optimize images for web ⚡

One of the most common mistakes I noticed by reviewing websites is that many people don't optimize their images.

Let's take a look and why should you optimize them and how you can do it efficiently.

Let's start! 🧵
Images are one the most important parts of a website. But unoptimized images file's size is often very big.

One simple image could be 2MB, imagine if you have 10 of them. Now imagine someone with really slow internet trying to access your website. It will take forever.
Let's put an example of how we can optimize it.

This is a screenshot of my new portfolio (still under construction), when I take the screenshot, it's a .png file and the size is 539KB. Image
Now we need to convert it to .webp.

What's a .webp file? Webp is a file format developed by Google to reduce the size of images without having to sacrifice quality for storage space.

I use an online converter. image.online-convert.com/convert-to-webp

New file size? 93.61KB. Image
One other option in this last website is changing the size, the image is too big. Let's imagine the maximum width that is gonna show on our website is 700px, so let's change the size on the options.

(I'm using the original image here)

So... what's the result? Image
The image file size is now... 17.12KB!

Quite a big difference from the 539.97 KB we started with.

Now imagine half a megabyte for each image of your website. Think of how much load time you can save. Image
If you want to check if your images are optimized, you can use PageSpeed insights.

developers.google.com/speed/pagespee…

This is an example of images not optimized. Look at the saving possible by just doing these simple steps! ImageImage
You should start optimizing all your images today.

Your website will be faster, users will be happier, and your hosting costs will be cheaper.

I hope you enjoyed this thread, I'm planning to do one very soon on how to optimize for SEO, follow me if you want to see it! ⚡

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Nacho Iacovino ⚡

Nacho Iacovino ⚡ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @nachoiacovino

19 Feb
I recreated the Stack Overflow login page with Tailwind CSS.

It's not perfect but I'm happy with the end result.

What differences can you spot? 👀

What do you think? What should I recreate next? CloneOriginal
Let's a poll! Which one do you think is the real one?
If you would like to learn how to use Tailwind and how to create clones like this, you would love the course I'm building.

Sign up to stay updated!

windcourse.co
Read 4 tweets
18 Feb
How to deploy (upload) your project to the Internet.

For free.

One of the most important things when creating a website/portfolio is putting it online. People need to see what you create.

I'm gonna explain the easiest way to do it.

You are gonna love it.

Let's begin 🧵 How to upload your project ...
We are gonna use @vercel.

First, go to vercel.com/signup and create an account. This is completely free.
We need two more things, Node.js installed and a code editor, I'm using @code.

You can download Node here: nodejs.org/en/ (Recommended version)

And VSCode from here: code.visualstudio.com
Read 10 tweets
15 Feb
JavaScript fundamentals before learning React.

Some people believe that you need to be a JavaScript master before starting learning React, and that couldn't be further from the truth.

You should know some fundamentals, and I want to tell you exactly which ones.

Let's begin 🧵 JavaScript fundamentals before learning React.
let and const.

This is the ES6 way of assigning variables, it replaces "var".

"let" is for variables that are gonna be reassigned in the future.

"const" is for variables that are not gonna change, you define them and you use them, but they have a "constant" value.
imports and exports.

A big part of React is reusability. You create a component (like a button), export it, and then import it on your other components without having to write it out again. /* components/Button.js */ const Button = () => {   return <
Read 11 tweets
8 Feb
Let's build your first App in React.

React is the most popular JavaScript library to build websites nowadays.

If you have never tried it, I want to show you today how to create a very basic counter app that will teach you the fundamentals.

Let's begin! 🧵
First step!

Having Node.js installed. If you haven't, follow this link and download and install the recommended version.

nodejs.org/en/
Now we are gonna open a terminal (cmd, Bash, PowerShell...) in the folder that we want to create our project.

Write this command:

npx create-react-app my-first-app

npx will download CRA latest version and delete it when it's done. "my-first-app" is the name of our app.
Read 15 tweets
23 Dec 20
Let's talk about Git.⚡

Git is the only thing that's it's common in our field. 99% of developers use it.

So you should learn it. At least the basics. And use it. On all your projects.

Let's start the thread.🧵

#100DaysOfCode #git #github #javascript #CodeNewbie #js What is Git? Let's learn th...
⭐ What is Git?

Git is a version-control system for tracking changes.

This allows you to save different versions of your projects and come back to them when necessary.

This also allows you to work in a team in a much better, organized way. ⬇
⭐ First steps.

On your project, your first command should be:

git init

This will initialize a new repository, this repository is a hidden folder called .git that tracks the changes made to files in your project and builds a history over time. ⬇
Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!