# How to Optimize Images for WordPress

- Link: https://wpbarista.com/how-to-use-images-in-wordpress/
- Published: 2024-10-20T17:27:28-08:00
- Author: Cathy Mitchell

So, you have a shiny new camera and want to make sure your images look just as good
to everyone else as they do to you? Or maybe you are seeing so many_ .pdf, .webp,.
gif, .avif, .jpg,_ etc. etc. you find yourself tempted to add .help and call it 
a day? Don’t worry, you’ve come to the right place!

The words, _Image, Photograph, Graphic_, are all used interchangeably throughout
this article, as any media that you are adding to your website needs the same optimization
and size treatments.

There are two main errors bloggers make when it comes to uploading images to their
sites: loading them [too small](https://wpbarista.com/how-to-use-images-in-wordpress/#which-size),
and using the wrong [optimization plugin](https://wpbarista.com/how-to-use-images-in-wordpress/#plugin).
Don’t worry though: we’ve gone ahead and done all the math to let you skip straight
to the solution.

We’ll tackle the size first: including pixels, orientation, and resolution. Then,
we’ll give our recommendation for the hands-down best software to do the rest of
image optimization, specifically for WordPress.

There’s also a short [FAQ](https://wpbarista.com/how-to-use-images-in-wordpress/#faq)
at the end that compiles all the common questions we get with their answers.

> **_That was true in 2007 but not today!_**

Current advice we see quite often is, “only upload the size you need”. That was 
true in 2007 but **not today!**

In the very busy age of the internet (on phones, TV’s and watches) we need _modern_
image formats that are pixel perfect, but also fast! modern image formats are called.
avif or .webp.

Did I mention google? Yeah, google can be picky too- but don’t worry! Although it’s(
unfortunately) no longer as simple as “only as big as necessary”, it’s also something
we deal with day-to-day here at WPBarista. We’ll explain how to make Google happy
too.

**_It is my life’s mission and my heart’s passion to stop the 600px wide images!!_**
If you’ve been around here any length of time you’ve heard my slogan, 2000px wide–
always! 2000px wide and _whatever_ high. _So how high is that?_

Unfortunately this means understanding how WordPress crops your images, and a wee
bit about aspect ratios. I’ll go through step by step. Once you get it, it will 
become second nature!

## Preparing Your Photographs for Upload

TL;DR

 1. lower resolution
 2. save as jpg
 3. resize to 2000px _wide_ x whatever_ high_*

*[featured images only]crop to your chosen aspect ratio

“But what _size_ do I need?”, you may ask. You probably mean _width_ x _height _when
you ask about _size. _If I say your images are too big for your web hosting… do 
I mean width x height? _No! _I mean resolution! I’ll explain resolution below. For
now, let’s use _dimension_ when referring to the width and height of an image.

_Resolution: _the density of pixels
_Dimensions: _the width x height in pixels

![](https://i0.wp.com/wpbarista.com/wp-content/uploads/2024/10/marshmallow-v-brick.
jpg?resize=1024%2C1024&ssl=1)

**Resolution vs. Dimensions: **Let’s say you have a brick and a marshmallow; both
are 4inches x 4inches. They have the same _dimensions _but the _density_ is different.
That density difference is huge even though the dimensions of both items in our 
analogy are the_ _same. This is how resolution works. **Resolution = density of 
pixels. Dimension is the width and height.**

## Changing the Image Resolution

Your images must be marshmallows! The webpage can’t handle many bricks before it
slows down. (I am so proud of this analogy right now.)

Below we discuss _both _dimensions _and _resolution.

**Resolution = density of pixels. **
**Dimensions = width x height**

**Rule #1: Change the resolution before you change the size.** Before calculating
the size you want, lower the resolution (make it a marshmallow!). Most programs 
do this with the export or save function. Once you click save/export, you’ll get
some choices. You want the 100ppi (Marshmallow) resolution. Some programs call it‘
web-ready’ or ‘low quality’.

Here are some example settings you’ll need:

 1. On my camera, I have it set to 100ppi by default.
 2. **Canva **– in download menu, select “jpg” at 80% quality.
 3. **Photoshop** – choose “web ready” jpg.
 4. **Adobe Illustrator** – choose web ready jpg or svg
 5. **PicMonkey** – Use the “Web” tab and choose jpg.

![](https://i0.wp.com/wpbarista.com/wp-content/uploads/2024/10/Untitled-2000-x-500-
px-2000-x-2000-px-2000-%C3%97-2000px-11-08-2024_12_46_PM.jpg?resize=890%2C486&ssl
=1)

Canva Download Settings Example

### What about .jpg, .webp, .svg or .avif?

Since WordPress version 5.8 you can upload images with the file extension .webp 
in WordPress. WEBP is considered “modern image format”: it’s able to load much faster
than an optimized .jpg image, with little to no sacrifice in quality. But if you’re
using the plugin we recommend, you do not need to worry about creating webp images–
ewww.io will do it for you.

.svg formats are for another article – but you do _not_ need to use .svg or .avif
formats in regular every day blogging.

**Rule #2: Always use jpg if you can**. (transparency requires png)

![](https://i0.wp.com/wpbarista.com/wp-content/uploads/2023/10/99designs-image-types.
jpg?resize=930%2C610&ssl=1)

## The Best Dimensions for WordPress Images

As we said in the beginning, you need two things for the perfect image: _resolution_(
make it a marshmallow) and _dimensions. _The dimension is the width x height of 
the images.

**Width: **This is easy! Make your images 2000px wide. WordPress will shrink them
to the right size depending on the reader’s screen.

If you want a super-wide image that crosses the _whole_ screen, you may need to 
upload 2800px or more. But 99% of the time, **2000px wide is your number. **

**Height: **the height you need depends on the _aspect ratio _of the place where
the image goes. If you want to put the image into a _tall_ spot on your post, then
it needs to be 2000px wide and _tall_. If you want a _wide landscape_ spot to hold
the image, than it needs to be 2000px wide and _short._ The obvious question is,
_how _short? or _how _tall?

To make sure your images look good everywhere, we’ll upload the photos in 2000px
wide, and let WordPress (and your theme and plugin) work it’s magic to make it fit
the device. So your images can be any square, landscape or portrait size that you
can think up – _as long as the width is 2000px_!

If you want galleries in your posts, then it is best to upload uniform sizes so 
it looks neat and tidy. The only time this does _not_ work is for **featured images**.
We will tackle featured images below.

## How to Size Featured Images

Featured images are the images that appear in the “thumbnail” of a post. This image
tells the reader whether they should read your post or not. They appear in any list
of posts like category pages, home page sliders, search results, and more!

In order to keep these looking uniform on your site, you need to choose an aspect
ratio and _stick to it!_

### Quick overview of Aspect Ratios

Back in the day, when we printed photographs we had a common aspect ratio of 4×6
for photos. That was 4″ high and 6″ wide. That is an aspect ratio of 2:3.

When you graduate and your parents want to show off your big smiling face, they 
order an 8 x 10 or even an 11 x 17. Those are aspect ratios of 4:5 and 1:1.54 respectively.
See the image below for some examples of aspect ratios that are commonly found online.

![demo of aspect ratios](https://i0.wp.com/wpbarista.com/wp-content/uploads/2024/
10/Raw-Logo.jpg?resize=1190%2C548&ssl=1)

An aspect ratio of 1:1 (square), will be square at 2000px x 2000px or at 100px x
100px. A square is a square regardless of size.

When choosing an aspect ratio for _your featured images_, you need to note your 
site’s _archives_ aspect ratio. See diagram below. The ones on the left are all 
the same aspect ratio. The ones on the right are different aspect ratios, creating
a non-uniform look. This is the reason to select one aspect ratio and stick to it.

![](https://i0.wp.com/wpbarista.com/wp-content/uploads/2024/10/Untitled-2000-x-500-
px-2000-x-1500-px.jpg?resize=1024%2C768&ssl=1)

### How to find your featured images’ aspect ratio

 1. Have a look at one of your post archive pages
 2. You can find one of these by clicking any category, or
 3. by clicking on any author link
 4. You should see a list of posts with featured images. Are those featured images 
    square, wide or tall?

Now that you now if they are tall or short and wide, let’s discover the exact pixel
height you need.

**Built-in Ratios**: WordPress has built-in ratios. If you use Kadence blocks, they
have built-in ratios too. But these are options you have _after you upload the photograph._**
If you use these built-in aspect ratios to crop your images, you may get unexpected
results. **

If you want to control how your images look, then _prepare your images **before **
upload. _We’ve already covered changing the resolution. And we know the width. And**
for featured images only, **we also need the aspect ratio.

Look in the table below to see examples of aspect ratios and discover which one 
you currently use. (or upload a featured image to your favorite AI bot, and ask 
it what your ratio is)

 * [Square](https://wpbarista.com/how-to-use-images-in-wordpress/#tab-square)
 * [Landscape](https://wpbarista.com/how-to-use-images-in-wordpress/#tab-landscape)
 * [Portrait](https://wpbarista.com/how-to-use-images-in-wordpress/#tab-portrait)

Square Ratio

![](https://i0.wp.com/wpbarista.com/wp-content/uploads/2023/10/2000x2000fontsize48.
gif?resize=1024%2C1024&ssl=1)

1:1 Ratio

Always use 2000px wide. And if you have chosen to use square (1:1 ratio), then it’s
always the same.

 * 2000px x 2000px

Landscape Ratios

![Grey blank image with title 2000px x 1500px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x1500fontsize48.gif?resize=1024%2C768&ssl=1)

4:3 Ratio

![Grey blank image with title 2000px x 1333px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x1333fontsize48.gif?resize=1024%2C682&ssl=1)

3:2 Ratio

![Grey blank image with title 2000px x 1125px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x1125fontsize48.gif?resize=1024%2C576&ssl=1)

16:9 Ratio

![Grey blank image with title 2000px x 1000px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x1000fontsize48.png?resize=1024%2C512&ssl=1)

2:1 Ratio

![Grey blank image with title 2000px x 667px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x667fontsize48.png?resize=1024%2C342&ssl=1)

3:1 Ratio

![Grey blank image with title 2000px x 500px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x500fontsize48.png?resize=1024%2C256&ssl=1)

4:1 Ratio

Always start at 2000px wide. And use your selected ratio every time for the perfect
image.

 * 4:3 works out to 2000px x 1500px
 * 3:2 works out to 2000px x 1333px
 * 16:9 works out to 2000px x 1125px
 * 2:1 ratio works out to 2000px x 1000px
 * 3:1 ratio works out to 2000px x 667px
 * 4:1 ratio equals 2000px x 500px

Popular Portrait Ratios

![Grey blank image with title 2000px x 2667px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x2667fontsize48.gif?resize=1190%2C1587&ssl=1)

3:4 Ratio

![Grey blank image with title 2000px x 3000px](https://i0.wp.com/wpbarista.com/wp-
content/uploads/2023/10/2000x3000fontsize48-scaled.gif?resize=1190%2C1785&ssl=1)

2:3 Ratio

These ratios were built-in to Kadence for your convenience, and they are common 
online too.

 * 3:4 ratio is 2000px x 2667px
 * 2:3 ratio is 2000px x 3000px

So if you have an aspect ratio of 4:3, and the images are always 2000px wide, then
we need the height. Use the chart above, or I recommend asking AI like so: **“What
is the height for an aspect ratio of 4:3 when the width is 2000px?”** It will answer
1500px. Now you have the height!

In our example, your aspect ratio is 4:3 and your featured images are 2000px x 1500px.
Always and forever. Amen.

You’re done. You have the resolution, aspect ratio, and width and height for your
regular images and your featured images. You are now ready to upload them to WordPress!
Let’s take a brief sidebar, and then get the optimization plugin installed and configured.

## Side Lesson: WordPress & Cropping

Now – this is where we take a detour to prevent WordPress from skewing your image.
We need to learn how WordPress will _change_ your images after upload – and preferably,
stop it from doing so!

When uploading an image, this is what WordPress does **by default:**

 1. Pre-upload safety & size checks. Note aspect ratio.
 2. Add _all_ the sizes needed (by the theme & plugins) to Media Library instantly.
 3. Check the assigned space for the image: what is the aspect ratio?
 4. If the image aspect ratio & the assigned space are different = check **the theme**:
    does it want hard crop or soft crop?
 5. If soft crop, **squish** the image into the space.
 6. If hard crop, **slice** the image until it fits in the space.
 7. If the image and placement are the same aspect ratio, no cropping.

Whether or not this processing is a good or bad thing, depends on what you need.
See examples below that show how cropping works, and decide if you want hard crop,
soft crop, or no crop.

_Upload a square image into a portrait space, using hard crop and soft crop. Soft
crop will squish the square into the portrait. Most of the time, this makes the 
image incredibly small or skewed. Hard crop will slice off the left and right to
make it fit perfectly into the portrait space without skewing the image. _

![Demo: uploading square image into portrait orientation space, with hard crop and
soft crop.](https://i0.wp.com/wpbarista.com/wp-content/uploads/2025/12/3-edited.
jpg?resize=1190%2C670&ssl=1)

When uploading a square image into a portrait space.

_Upload a square image into a landscape space. The square will be enlarged and skewed
or kept in its entirety with tons of space on left and right in soft crop. Hard 
crop will chop off the top and bottom so the image fits perfectly. _

![demo of Uploading a square image into a landscape space using hard crop and soft
crop](https://i0.wp.com/wpbarista.com/wp-content/uploads/2025/12/1-edited.jpg?resize
=1190%2C670&ssl=1)

Uploading a square image into a landscape space

_Upload a square image into a square space_. No cropping or processing by WordPress.

![Demonstration of square image into square orientation spaces - in both hard crop
and soft crop. ](https://i0.wp.com/wpbarista.com/wp-content/uploads/2025/12/2-edited.
jpg?resize=1190%2C670&ssl=1)

when uploading a square image into a square space

For most photographers, they do not want anything re-arranged, enlarged, skewed 
or chopped. And that is why you want to upload your images in the _same_ aspect 
ratio as it’s assigned space. It will prevent WordPress and your plugins from cropping
it.

Stop WordPress from processing your images by uploading the _same_ aspect ratio 
as it’s assigned space.

## Review!

Prepare your images for upload by doing the following tasks, discussed ad nauseum
above.

 1. lower resolution
 2. save as jpg (or web-ready)
 3. find your featured image aspect ratio (ie: 2:3)
 4. crop the photo(ie 2000px x 3000px)

And now – we have our dimensions, and the correct resolution. Let’s install the 
plugin before we do our final upload. Fortunately, this step is a one-time deal!

## Image Optimization

![ewww.io landing page screenshot](https://i0.wp.com/wpbarista.com/wp-content/uploads/
2023/09/Home-EWWW-Image-Optimizer.jpg?resize=1024%2C497&ssl=1)

## Why we Use Ewww.io

We use ewww.io because it is unique in the services it provides – and reliable! 
We use the **Compress API **to optimize every single image on the server – saving
tons of space. And we use the EASY I/O service to deliver web-optimized images on
the fly (saving your server tons of bandwidth).

 1. the Compress API, takes the gigantic images that you _used_ to upload directly 
    from your phone (at about 1mb in size) and makes them all reasonable without losing
    any clarity.
 2. the Easy IO swaps out the image for a webp version before the reader sees the image

Modern Image Formats are those in avif and/or webp. **Webp** is promoted by Google.
WebP is natively supported in Google Chrome, Safari, Firefox, Edge, the Opera browser,
and saves up to 34% per image. ([webp](http://WebP is natively supported in Google Chrome, Safari, Firefox, Edge, the Opera browser,))

This plugin also has fallback options and a few more features that make it our favorite.
It is also very reasonable at $7/mo.

So, now when you upload any image to your site, EWWW.io will grab it, compress it,
store it properly. And, it will serve the image properly in your theme.

Now that you have the plugin installed. Let’s add the image to a post.

## Final Tips

Use the Media Library to store your images so ewww.io can do its job. **Do NOT**
link to the image or use the option to “add image by URL”.

Add all the prepared images to the media library all at once, and then open a post
and insert where desired. Alternately, while creating a post, insert an _image_ 
block, and then follow the onscreen prompts to upload a new image.

TIP: Drag an image from your desktop to an open post-edit screen to have it automatically
added.

## Step-by-Step Guide to Image Sizing

Time needed: 30 minutes

The short & concise version of the article above. Reference the article for details.

 1. **In WordPress, configure EWWW.io to compress images AND use easy i/o.**
 2. **Take one raw image from your computer/phone/camera and import to Canva.**
 3. **In Canva, resize image to your chosen aspect ratio. **
 4. **In Canva, resize image to 2000px wide.**
 5. **In Canva, save the image as .jpg with ~80% quality.**
 6. **Once you’ve saved your resized images on your device, open up your media folder
    and drop them in.**

## Video Demonstration in Canva & WordPress

## Frequently Asked Questions – Right here!

2000px wide by _whatever_ high (see the ratios section above). Use an optimization
plugin to serve modern image formats. All of these terms are explained above.

Normal people refer to the size of an image to mean either the width x height _or_
space it takes up (Kb and Mb). The right terms would be dimensions and resolution.

Quality is usually a combination of uploading a too-low resolution image, or too
small, coupled with an aggressive optimization plugin. Skewed images are a result
the wrong orientation in the space.

DPI stands for dots per inch. And PPI stands for pixels per inch. Dots per inch 
is a throw back to the early days of dot matrix printers. Both of these acronyms
are referring to the image resolution. See the Resolution section for more details.

The right optimization plugin makes or breaks the speed of the site. All the suggestions
above are to create the perfect size, that is also google-friendly and FAST. We 
recommend ewww.io only for the reasons outlined above.

Keep em relevant, fast and use alt-tags.

All advice in this post is accurate for **any** size device. If you upload the image
in the right resolution and put it in a place with the same orientation, there will
not be any issues on mobile phones.

Webp is a modern image format that most browsers support. It is up to 25% faster
than standard images. See the webp note in the post for more information.

 * [  Email ](https://wpbarista.com/how-to-use-images-in-wordpress/?subject=%5BShared%20Post%5D%20How%20to%20Optimize%20Images%20for%20WordPress&body=https%3A%2F%2Fwpbarista.com%2Fhow-to-use-images-in-wordpress%2F&share=email)
 * [  LinkedIn ](https://wpbarista.com/how-to-use-images-in-wordpress/?share=linkedin)
 * [  X ](https://wpbarista.com/how-to-use-images-in-wordpress/?share=x)
