A set of organized bookshelves.

If Search Engine Optimization (SEO) is a new term to you, know that it's a vital method for ranking high in search engines such as Google and Bing. However, you need to apply SEO to almost every aspect of your site, not just text. Learning how to optimize your WordPress galleries will give your whole site a boost, and potentially bring in more traffic as a result.

To do this, you'll need to make sure every part of your images is human-readable. However, there's more you can do, such as setting the right dimensions for images, and some other technical aspects.

Over the next few minutes, we're going to look at how to optimize your WordPress galleries for SEO and break down a number of ways to do so. Before this, let's give you a quick introduction to SEO.

A Brief Primer on the Importance of SEO

For the unaware, SEO is the approach you use to earn a higher ranking in Search Engine Results Pages (SERPs). It can be a complex rabbit hole of techniques and tactics to apply to your site. As such, there are entire industries focusing on SEO.

In most cases, you won't need an expert on hand to help you. Instead, you'll want to apply a few tips to optimize your content. The Moz blog is fantastic for gaining an insight into SEO at all levels. However, you don't even need to go this far – you can simply install a WordPress plugin such as Yoast SEO, The SEO Framework, Rank Math, or SEOPress:

The SEOPress plugin.

This will give you a list of elements on your post or page to optimize. In a nutshell, the more green lights you see, the better your SEO for that page:

Yoast SEO's traffic light system.

The one drawback of these plugins is that they only offer minimal analysis of your image SEO. This is crucial to understand because your images and associated galleries can have a big impact on your search rankings and traffic numbers.

What It Means to Optimize Your WordPress Galleries

Much like your text content, your images will also benefit from optimization. After all, they're elements of your site that are searchable. Many search engines include a dedicated image tool, and this can be a valid and much-needed way of winning new site traffic:

A SERP page for landscape images.

Because of this, it will come as no surprise that you should also optimize your images for SEO. Of course, you won't be able to optimize the image contents, but you can adjust all of the associated elements.

We're going to have more on this as the main focus of the article, but optimizing file names, dimensions, and more can offer you a traffic boost in a number of different ways.

Why You'd Want to Optimize Your WordPress Galleries for SEO

There are lots of benefits to general-purpose SEO, such as an improvement of your search engine ranking, more visibility relating to the focus keywords you choose, and better indexing by search engines. The same applies to image SEO too.

In fact, images represent a substantial portion of global web traffic, and for this reason alone you'll want to consider further image SEO tweaks. However, photography and otherwise image-heavy sites will benefit from dedicated SEO too. There are a few reasons for this:

  • Because image-based search is popular, there are lots of opportunities to win traffic from your galleries alone.
  • You have more chances for indexing with proper image SEO in place. This means you could see greater rankings for associated pages, or new rankings based on your keywords.
  • Some aspects of optimizing your images can improve your page loading speed. This is a ranking factor for almost all search engines.

On the whole, it's important to recognize that image SEO is just as key to your site's success as general SEO. The good news is that there are lots of ways you can optimize your WordPress galleries, and they won't take more than a few moments a piece.

How to Optimize Your WordPress Galleries for SEO (3 Tips)

Over the rest of this article, we're going to look at how to optimize your WordPress galleries for SEO. However, some of these tips will see some cross-over with general SEO and image optimization too. There are subtle differences between these areas, and we'll touch on that too over the course of the post.

1. Look to Balance the Size Of Your Image Files Against Its Quality

With images in hand on your hard drive, the first task should be to make sure they are the right size for your needs and are small enough to load fast.

In our opinion, there are three areas to think about: the file type of the image, its size and quality, and the dimensions you set for it. Let's begin with the file type, although note that you can experiment with order here. For example, you can output an image with the correct file type at full quality, then adjust the dimensions, before working with the quality.

As an alternative, you can flip some of these tasks around based on your own workflow. The key is to experiment.

Choose the Right File Type

This will likely be one of the easier decisions you make regarding optimizing your WordPress galleries. However, if you get this wrong, it can be disastrous throughout the rest of the chain.

While there are image formats such as WebP, HEIC, and more, your focus should be on the 'holy trinity of web image formats. There are specific situations to use each one, and you'll want to consider this for your own images:

  • Portable Network Graphics (PNG). This is for created images, in a nutshell. Any graphics, drawing, and non-photographed works should use the PNG format.
  • Joint Photographic Experts Group (JPEG). If you're a photographer, JPEG will be your friend (or at least a known enemy). It's a format to showcase photographs, and it will often be the target conversion format from RAW.
  • Graphics Interchange Format (GIF). Hey, if you want to show off a cat eating whipped cream or a reaction from a TV show, a GIF will work! It's an animation format but sees use now as a way to 'screen cap' shows or meme-related content.

The decision of which file format to use can seem tough, but it's simple really. If the images themselves come from your camera, they'll start as RAW files in most cases and you'll convert them to JPEG format. If you're a sports photographer shooting JPEG anyway, you have even fewer decisions to make.

As such, most photographers will want to use JPEG formats for the web. However, this isn't the end of the story, as there are more considerations to make to get the best image possible.

Set a Suitable File Size and Quality

There's a fine balance between the size of your image and its visual quality. You'll know this if you ever play with the Quality slider within Lightroom, Capture One, Affinity Photo, and other programs:

The macOS Preview app's Quality slider.

At first glance, the file size itself will seem tiny at full quality. In lots of cases, you'll see an image come from your editing software at around a few megabytes for an APS-C camera. It could be that you don't any reason to optimize the image further, but this is a mistake.

Even an image that is about 200 kilobytes (kb) could have drastic consequences for your page loading speed, and your image SEO. For one image, it won't be an issue, but for 5–10 on a page, your server will need to load megabytes of image data, and this will take seconds. In short, you don't have seconds to capture a user's attention.

As such, stick to the following rules of thumb for your image file size and quality:

  • Keep your images under 200kb where possible, unless an image needs something different.
  • You set the quality of your image in a slightly different way across the various editing apps, although you'll often see a scale-out of 100. We'd advise not to go lower than 80. 85 could be a better choice for most images.

You can also optimize the image file sizes further and run them through a dedicated optimization program. Imagify or ShortPixel are both wonderful, and let you choose from various compression levels to get the right result you need:

The ShortPixel image optimization interface.

Here, you'll want to make sure you choose a compression level low enough to reduce your file size as much as possible, without introducing artifacts that can hamper the viewing experience. This is going to be a decision you make based on your own needs, although too much compression always seems to look bad with 'busy' images full of color.

Use the Right Dimensions for the Application

After a bit of experimentation, you'll notice that you can only get your image file size down so far before there's a plateau. In fact, your image dimensions play a big part in how weighty your image is, and how it displays on various websites.

As with file size, you'll want to make your images small enough that they will load fast while presenting enough definition for sharp 'Retina' or other High Definition (HD) screens of all sizes. Not only that, you'll also want to make sure the image will display with decent quality on social media.

One area that might confuse you is whether to adjust image dimensions within WordPress. Our advice is not to do this, because it impacts the filename (more of which shortly). Instead, a good rule of thumb is to make your images 2048 px on the long edge. This will cover all sorts of applications, such as social media, mobile screens, and more.

For images coming from an APS-C camera, you'll cut the size down by about 30–50 percent. Full-frames could see even greater cuts. From here, you can optimize further, and set the display size for the image within the post or page editor you use:

The Block Editor's image dimension settings.

Combined, all three of these steps should give you an image that's small enough to load quickly, while offering as much quality as the full-size version.

2. Use Keyword-Rich Filenames for Your Images

Once you have an image at the right file size, the next task is to give it a suitable file name. This is one area that many users neglect, but it's a 'quick win' with regards to optimizing your WordPress galleries.

Note that we don't recommend sticking with the file name your editing software gives you (or that you set). Despite this being readable and valuable for your archiving strategy, it's not going to cut the mustard for image SEO.

Capture One's export dialog.

Instead, look to give your image a descriptive name – for example, "dogs-playing", "colored-pencils", or "dj-punk-portrait". This gives you a way to tell search engines exactly what your image is in a direct way, and will help search traffic find those images from their query.

It's also worth noting that you should use the image filename to 'keyword stuff'. This means adding a keyword without context in order to 'game the rankings'. For example, an image of a bridge with the filename "image-seo-12" isn't going to give you the outcome you desire, and could even harm your overall site's ranking.

In summary, give each image a distinct and descriptive filename, which will help search engines discover what the image is of. This way, users will be able to find it too.

3. Add Metadata to Your Images

Following on from your file name, you'll want to get deeper and give your images specific metadata. This will help in a few ways – accessibility is important, but because the focus here is on optimizing your WordPress galleries for SEO, this is what we'll look at.

Also, you'll often perform this step within WordPress itself, as there isn't a reliable way to get the image metadata you add on export onto your site. What's more, working with the image metadata within WordPress gives you a good way to customize it to your site's needs.

If this is a new area of discovery for you, setting image metadata within WordPress takes place through the Media > Library link within your dashboard:

The Library link within WordPress.

Clicking an image on this screen will bring up a few fields relating to your image's metadata:

The Media Library metadata fields.

You can fill them in here, save your changes, and they will associate with the image wherever you choose to display it. Note that you can also fill metadata in when you import an image to the Media Library, and from your chosen page builder screen (including the Block Editor).

Alternative ('Alt') Text

First off, your alt text is an accessibility helper. If your image isn't able to display, or the user isn't able to view it due to a disability, the text will display in its place. It's also valuable for screen readers too, as they will read out the alt text for visually impaired users.

There are a few key points to note for good, valuable alt text:

  • You're describing the image itself, rather than the file's context. For example, it wouldn't be "An example of a landscape photograph." Instead, it would be "A bridge, surrounded by mist." You'd give a literal description of the image at all times.
  • What's more, you should write in a full sentence, and give it the same care you would for site text. This means capitalization, periods, and other necessary punctuation.
  • Keep the alt text short. We'd say no longer than one sentence is more than enough.

Given its importance, there's not a lot to writing good alt text, although you'll also want to make sure you don't keyword stuff here, much like the file name.

A Title

If you feel compelled to add alt text to every image that references "…an example of…", know that the image title is the best place for this. It's a descriptive attribute that describes the context of the image, much like is for a blog post.

Because of this, you can consider the title to introduce the nature of the image (e.g. "An example of a landscape photograph"), and the alt text to offer more focused insight.

As with the alt text (and all of the metadata fields), you'll want to reference the general rules: use full sentences, capitalization, and punctuation throughout.


We'd bet that the image description is the most skipped over metadata field. However, it's a mistake you shouldn't make. This is because the description display on image SERPs, so it's of vital importance to optimize your WordPress galleries:

A SERP for "misty bridge".

In our example, there are some good descriptions, and some not so good. The better examples describe the image with a little context: "Misty Bridge At Heteca Head Photograph" is a good one.

The takeaway here is to give your images a description, as this will help the images rank better, and help users choose the right one from their search query.


Unlike alt text and titles, captions do display on the front end of your site. You have a lot more leeway here with captions because they offer further context and explanation to the image itself. As such, you should follow the rules you put in place for your site's content, rather than any SEO-focused considerations.

Wrapping Up

Search Engine Optimization is a vital cog in the wheel of earning more traffic. By extension, this extra footfall for your site could end up generating customers and revenue. As such, you'll want to optimize your WordPress galleries for SEO as a matter of course.

You can do this by working with your image before it gets into WordPress. If you make sure each image has the right dimensions, is small in file size, and has a suitable file name, this is a great start. Once you import the image into WordPress, you can work with the metadata and make sure your photos have the best chance of getting to the top of SERPs.

Do you want to optimize your WordPress galleries for SEO, or do you think the process is a waste of time? Share your thoughts in the comments section below!

This Post Has 2 Comments

  1. WOW, thank you very much for this useful information. I love to work with this plugin and will heed the tips. best regards, nick

Leave a Reply

Close Menu