Images are the most commonly ignored on-page SEO element on WordPress sites. Most publishers add images for visual interest, upload them with whatever filename the camera assigned, skip the alt text field, and wonder later why their pages load slowly and their image search traffic is zero.
That is a missed opportunity across multiple ranking factors simultaneously. Images affect page load speed, which determines your Core Web Vitals scores and directly influences rankings. They contribute to on-page relevance through file names and alt text. They are indexable content that can appear in Google Images, which drives a meaningful volume of additional organic traffic. And they affect whether your page passes or fails the CLS metric in Core Web Vitals.
This guide covers every image SEO decision you make on WordPress from file naming before upload to alt text writing to compression to CLS prevention with the specific settings to apply in Rank Math.
Why Image SEO Matters Beyond Just Google Images
Most publishers think of image SEO purely as a path to Google Images traffic. That is real — over 20% of Google searches happen through Google Images, and properly optimised images do rank there. But the performance impact of image decisions on your core search rankings is just as significant and often more immediate.
Unoptimised images are the leading cause of poor LCP (Largest Contentful Paint) scores on WordPress sites. LCP measures how long it takes for the largest visible element on the page to load. On most WordPress pages, the hero image is the LCP element. An oversized, uncompressed image delays LCP and creates a direct Core Web Vitals failure — a confirmed Google ranking signal.
Images without explicit width and height attributes cause CLS (Cumulative Layout Shift) failures. When a browser does not know the dimensions of an image before loading it, the page layout shifts as the image appears — pushing text and other elements down. High CLS is another Core Web Vitals failure, another confirmed ranking signal, and one of the most noticeable performance problems for actual users.
Getting image SEO right solves three separate ranking problems — Google Images visibility, LCP performance, and CLS performance — with the same set of decisions applied once per image.
File Names: Rename Before You Upload
The file name of an image is the first signal Google uses to understand what the image depicts. When Google crawls your page, it reads the image URL — which includes the filename — as one of several signals for identifying and ranking the image.
“IMG_4823.jpg” gives Google nothing. “rank-math-seo-setup-titles-metas-panel.webp” tells Google the exact content, context, and page relevance of the image before it processes the alt text or surrounding content.
File Naming Rules
- Use hyphens between words, not underscores or spaces. Google treats hyphens as word separators. Underscores are treated as connectors — “rank_math” is read as one word, not two. Spaces get URL-encoded to %20, which creates messy URLs.
- Use all lowercase letters. Some servers are case-sensitive and an uppercase URL may not match the lowercase version, causing broken image links.
- Include your primary keyword or a closely related descriptive term naturally. Name the image after what it actually shows, and if that happens to include a relevant keyword, use it.
- Keep names under 50 characters. Very long filenames become unwieldy in URLs and offer no additional SEO benefit beyond the first few descriptive words.
Rename files on your computer or phone before uploading to WordPress. Once an image is in the media library, changing the filename in WordPress does not change the underlying file name — it only changes the title field in the media library. The original filename stays in the image URL.
Alt Text: How to Write It Correctly Every Time
Alt text is the written description of an image stored in the HTML alt attribute. It serves two purposes: it provides a text alternative when the image cannot load, and it is read aloud by screen readers for users with visual impairments. Google also uses alt text as a signal for understanding image content and matching it to image search queries.
According to Yoast’s image SEO documentation, Google places a relatively high value on alt text for determining what is in an image and how it relates to the surrounding text. Their Yoast SEO plugin specifically checks whether at least one image on the page contains alt text that includes the focus keyword — a confirmation that Google reads and uses alt text as a relevance signal.
How to Write Good Alt Text
Describe the image specifically and accurately. A good alt text answers the question: “If this image could not load, what would a reader need to know to understand what they are missing?”
“Screenshot of Rank Math’s Titles and Metas panel showing the noindex toggle for author archives set to on” is good alt text. It is specific, descriptive, and naturally includes relevant terms without forcing keywords. “Rank Math settings” is too vague to be useful to anyone. “Rank Math SEO plugin 2026 settings noindex author archives WordPress on-page” is keyword-stuffed and reads as machine-generated — Google’s spam systems recognise and discount this pattern.
When to Use Empty Alt Text
Decorative images — images used purely for visual spacing or design that convey no information relevant to the content — should have an empty alt attribute: alt="". This tells screen readers to skip the image rather than announcing it, which improves the experience for users with visual impairments. Google also respects empty alt text as a signal that the image is decorative and does not need to be indexed.
One Keyword-Containing Alt Text Per Page
You do not need to put your primary keyword in the alt text of every image. As the Amsive image SEO guide recommends, only one or two images per page should have alt text that includes the target keyword — specifically the images that visually represent the core topic. Forcing the keyword into every image’s alt text is a form of keyword stuffing that Google’s systems are designed to detect and discount.
WebP Format: The Right Choice for WordPress in 2026
WebP is Google’s open image format, designed specifically for web delivery. It produces files 25 to 35% smaller than JPEG and up to 80% smaller than PNG at equivalent visual quality. Smaller files load faster, which directly improves your LCP score and overall page load time.
All modern browsers support WebP. Chrome, Firefox, Safari (since version 14), Edge, and Opera all render WebP images natively. There is no practical reason to serve JPEG or PNG to any visitor in 2026 unless you have legacy content with an existing audience that may be using very old browser versions.
Converting Your Images to WebP on WordPress
You do not need to convert images manually before uploading. Install either ShortPixel or Imagify — both convert uploaded images to WebP automatically and can process your existing media library in bulk. Both have free tiers sufficient for most new WordPress sites.
Configure the plugin to convert all new uploads to WebP automatically. Run the bulk optimisation on your existing media library. ShortPixel’s free tier processes 100 images per month. Imagify’s free tier covers 20MB of image data per month — enough to optimise a new site’s initial content in a few months without cost.
For the complete performance setup that includes image optimisation as part of Core Web Vitals improvement, read our guide on WordPress Core Web Vitals. Image SEO decisions also sit within the broader on-page and technical SEO framework covered in our Technical SEO for WordPress guide.
Width, Height and Preventing CLS Failures
CLS (Cumulative Layout Shift) measures how much the page layout shifts during loading. Every time an element appears and pushes other elements out of place, the CLS score increases. High CLS is a Core Web Vitals failure and a confirmed Google ranking signal.
Images without explicit width and height attributes are one of the primary causes of high CLS on WordPress sites. When the browser does not know the dimensions of an image before loading it, it cannot reserve the correct space. When the image loads, the browser inserts it and shifts all surrounding content to accommodate the new dimensions. That shift registers as a CLS event.
The fix is simple: add explicit width and height attributes to every image tag. When the browser knows the image dimensions from the HTML, it reserves the exact space before loading begins — preventing the shift entirely.
How WordPress Handles Image Dimensions
WordPress should add width and height attributes automatically to images inserted through the block editor. Check by inspecting any image on your published pages — in Chrome, right-click the image, select “Inspect,” and look at the <img> tag. You should see width="X" and height="Y" values alongside the src.
If they are missing, Rank Math’s Image SEO feature can add them automatically when configured. Go to Rank Math → General Settings → Image SEO and enable the relevant options. Alternatively, ensure your theme handles image dimension output correctly — lightweight themes like Astra and GeneratePress do this reliably.
Image SEO Settings in Rank Math
Rank Math provides a dedicated Image SEO section under General Settings. Here are the settings that matter most for on-page image SEO:
| Setting | Recommended State | What It Does |
|---|---|---|
| Add Missing ALT Attributes | Enable | Automatically generates alt text for images without manually written alt text, using the format you specify. Set the format to %filename% so the auto-generated alt uses the descriptive filename you created before uploading. |
| Add Missing TITLE Attributes | Disable | Image title attributes appear as tooltips on hover in some browsers. They have minimal SEO impact and no accessibility value. Disabling auto-generation keeps your HTML clean without any ranking consequence. |
| Format for ALT Attribute | %filename% | When auto-generating alt text, pulls from the image filename. This only works well if you have named your images descriptively before uploading — which you should be doing anyway. |
These settings handle images without manually written alt text. For featured images, hero images, and any image central to the content’s argument, always write the alt text manually in the image block settings rather than relying on auto-generation. Auto-generation is a safety net for secondary images, not a replacement for intentional alt text on important images.
How to Audit Your Existing Image Library
If you have published articles before establishing these image SEO practices, a one-time audit is worth running. Here is how to do it efficiently:
- Check alt text coverage using Screaming Frog (free up to 500 URLs). Crawl your site and go to the Images tab. Filter for images with missing alt text. Export the list and add alt text to the images on your most important pages first.
- Check file sizes using PageSpeed Insights (free). Enter your most important page URLs and look at the “Properly size images” and “Serve images in modern formats” recommendations. These tell you exactly which images on each page need optimisation.
- Convert existing images to WebP by running the bulk optimisation in ShortPixel or Imagify after installing. This processes your entire media library without requiring you to re-upload anything manually.
- Check CLS from images in Google Search Console under Core Web Vitals. Pages with CLS failures often have images without explicit dimensions. Use PageSpeed Insights on those specific pages to identify which images are causing the shifts.
Frequently Asked Questions
Q. Does alt text directly affect Google search rankings?
Alt text is a ranking signal for Google Images specifically — Google explicitly uses it to understand image content and match images to search queries. For traditional web search, alt text contributes to on-page relevance signals alongside file names, surrounding text, and page context. It is not a direct ranking factor for web results in the same way title tags are, but it contributes to the overall relevance signal that Google uses to evaluate how well your page covers its topic. It also has real accessibility value — screen readers use alt text to describe images to users with visual impairments.
Q. Should every image on my WordPress page have alt text?
Every informative image should have alt text that describes what the image shows and its relevance to the surrounding content. Purely decorative images — backgrounds, spacers, design elements that convey no information — should have an empty alt attribute (alt="") rather than a forced description. This tells screen readers to skip the image and tells Google the image has no indexable content. Do not force alt text onto decorative images just to fill the field.
Q. What is the best image compression plugin for WordPress?
ShortPixel and Imagify are both reliable and well-maintained. ShortPixel’s free tier covers 100 image compressions per month and supports WebP conversion. Imagify’s free tier covers 20MB of image data per month. For most new WordPress blogs publishing weekly, either free tier is sufficient for the first six to twelve months. Both plugins work in the background on upload and offer bulk processing for your existing media library. Avoid using multiple compression plugins simultaneously — conflicts between caching and compression plugins are a common cause of image loading issues.
Q. Does image file size directly affect SEO rankings?
Not directly, but through Core Web Vitals. Large image files slow page load time, which increases your LCP score. LCP above 2.5 seconds is a Core Web Vitals failure. Core Web Vitals are confirmed Google ranking signals as of 2021 and their weight has increased with every subsequent core update. So the path from large image files to lower rankings is: large file → slow LCP → Core Web Vitals failure → ranking penalty. Keeping images compressed to WebP format and appropriately sized for the layout removes this entire chain.
Q. How do I add alt text to existing images in WordPress?
Go to WordPress → Media → Library. Click on any image. In the Attachment Details panel on the right, find the “Alt Text” field and enter your description. Click Update. This updates the alt text for that image across every page it appears on simultaneously. For images in posts and pages, you can also click the image block in the editor and add or edit alt text in the right sidebar under “Alternative Text” in the block settings panel. Both methods achieve the same result.
Kia has worked in SEO and digital marketing for over a decade, building and optimising websites across different industries. He founded Technexies to share what actually works in modern search written from direct professional experience rather than theory. All content on Technexies is researched, written, and reviewed by Kia personally.

