Skip to content

Everything for WordPress, web development — and beyond

💡 Which image format to use for WordPress: 2026 guide

💡 Which image format to use for WordPress: 2026 guide

Site speed is not just about hosting and code. The images you upload often become the main bottleneck: a single "heavy" photo from a camera can weigh 5-8 MB and add a second to page load time. What if you have ten such photos?

The image format determines how it's compressed, how it renders colors, and how browsers display it. Choosing wrong means blurry screenshots, gigantic PNGs instead of compact WebP files, and ranking drops: Google factors Core Web Vitals into rankings.

Below are specific recommendations for each task: photos, screenshots, logos, animations. And how to add formats that WordPress doesn't accept out of the box.

💡 Quick overview:

  • Identify what you're uploading: photo, screenshot, logo, or animation, as this determines the format choice.
  • For photographs, use AVIF or WebP (compression is significantly better than JPEG at the same quality).
  • For screenshots and logos, PNG (lossless) or AVIF (lossy but drastically smaller size).
  • For animations, WebP instead of GIF (size savings by several times).
  • If WordPress doesn't accept the format you need, add support via functions.php or a plugin.
  • Always fill in alt text and compress images before uploading or automatically through an optimization plugin.

Why image file format is critical for WordPress

Format is not just a file extension. It's an encoding algorithm that determines three things: image quality, file size, and browser compatibility. All three directly affect your site's business metrics.

Close-up of a computer screen displaying WordPress code

Loading speed and Core Web Vitals. A 2 MB JPEG photo and the same photo in AVIF at 400 KB look identical but load 5 times differently. Google evaluates Largest Contentful Paint (LCP), and images are often the heaviest element on a page. Plugins like Smush convert files to WebP or AVIF automatically, but choosing the right source format saves server resources.

SEO consequences. Page speed is a direct Google ranking signal. Heavy images lower your Core Web Vitals score, and the page loses positions even if the text is perfectly optimized. A Portent study (2024) showed that reducing LCP from 4 to 2 seconds increases landing page conversion by 15-20% on average across B2B niches.

Visual quality. Different formats handle gradients, text, and fine details differently. JPEG produces artifacts around high-contrast edges, which looks messy on screenshots. PNG preserves sharpness but weighs several times more. AVIF solves both problems: compression is significantly more efficient than JPEG at comparable visual quality.

Adaptability. Users visit from phones, tablets, and desktops using different browsers. AVIF is supported by Chrome, Firefox, and Opera (since 2021-2022), and Safari since version 16 (fall 2022). WebP has worked everywhere since 2020. JPEG and PNG are the universal fallback that any browser from the last 20 years understands.

What image formats WordPress supports in 2026

WordPress has changed radically. While previously only JPEG, PNG, GIF, and ICO worked "out of the box," WordPress 5.8 (2021) added native WebP support, and WordPress 6.5 (April 2024) added full AVIF support.

Full list of formats available by default (WordPress ≥6.5):

Format

Compression type

Transparency

Animation

Colors

Ideal for

JPEG/JPG

Lossy

16.7 million

Photos, backgrounds

PNG

Lossless

❌ (APNG - yes)

16.7 million

Screenshots, logos, infographics

GIF

Lossless

✅ (1 bit)

256

Simple animations, memes

WebP

Both modes

16.7 million

Universal: photos and graphics

AVIF

Both modes

16.7 million + HDR

Photos and screenshots - priority

ICO

Lossless

16.7 million

Site favicon

SVG (vector format) is not accepted by WordPress by default for security reasons, as SVG files can contain JavaScript. If you need SVG for logos or icons, enable it through functions.php with filtering or use a specialized plugin like Safe SVG on WordPress.org.

Format comparison: when to use what

JPEG (JPG)

The standard since 1992 that still covers ~77% of all images on the internet according to W3Techs (2026). Lossy compression with quality level control; 85-92 is the "sweet spot." Millions of colors, excellent gradients.

Downside: no transparency support. Every JPEG is a rectangle. Not suitable for a logo on a transparent background. Plus compression artifacts on sharp high-contrast edges, meaning interface screenshots in JPEG look messy.

When to use: photographs, large background images, blog posts with photo content, if for some reason you're not using WebP/AVIF.

PNG

A format created as a free alternative to GIF. Lossless compression: not a single pixel lost. Full alpha transparency (256 levels) enables smooth shadows and semi-transparent elements.

Downside: size. A PNG photo can weigh 5-10 times more than the JPEG version at visually identical quality. For content images, this is unjustified.

When to use: interface screenshots (text sharpness is critical), logos, infographics, diagrams, icons, images with text.

GIF

A format with 256 colors and frame-by-frame animation. A legend of the early internet. Lossless compression, but the limited palette makes it unsuitable for photographs, as gradients turn into "steps."

Downside: huge animation sizes. A 5-second GIF can weigh 10-15 MB, while the same clip in WebP animation weighs 1-2 MB.

When to use: only when you need a short animation without sound and a WebP/AVIF version is unavailable.

WebP

Google introduced WebP in 2010, but the format truly "took off" after 2020 when all major browsers added support. It supports both lossy and lossless compression in one format. Transparency, yes. Animation, yes. WebP images are on average 25-35% smaller than PNG and 25-34% smaller than JPEG at equivalent quality.

Downside: at the time of writing, it's no longer the most efficient format, as AVIF beats it in compression. But as a fallback, WebP is indispensable.

When to use: universal format for everything. If you're unsure, go with WebP. Photos, screenshots, animations, graphics, it handles everything.

AVIF

The most efficient image format in 2026. Based on the AV1 video codec. AVIF images are 30-50% smaller than WebP at the same visual quality. Supports HDR, wide color gamut, lossy and lossless compression, transparency, and animation. WordPress 6.5+ supports AVIF natively, so you can upload directly to the media library.

Downside: Safari added support only with version 16 (fall 2022), so older iPhones and Macs on outdated versions won't display AVIF. This is solved by adding a WebP/JPEG fallback through the <picture> element or an optimization plugin.

When to use: priority format for photos and screenshots. If your site runs WordPress ≥6.5, AVIF is your primary choice, with WebP as insurance.

How to add support for additional formats

WordPress filters uploaded files by MIME type. If you need to allow SVG, BMP, or another format, add it through the upload_mimes hook in your theme's functions.php:

1add_filter( 'upload_mimes', 'techblog_add_mime_types' );
2function techblog_add_mime_types( $mime_types ) {
3 $mime_types['svg'] = 'image/svg+xml';
4 $mime_types['bmp'] = 'image/bmp';
5 $mime_types['webp'] = 'image/webp'; // WP 5.8+ not required
6 $mime_types['avif'] = 'image/avif'; // WP 6.5+ not required
7
8 return $mime_types;
9}

The code is added to the active theme's functions.php or through the Code Snippets plugin. Make a backup before editing, as a PHP error will crash the site.

For SVG, a warning. SVG files can contain JavaScript. If you enable SVG uploads, use the Safe SVG plugin (sanitizes scripts), which sanitizes files and removes scripts before saving to the media library.

An alternative is the File Upload Types plugin, which adds support for dozens of formats through an interface. For one or two formats, the upload_mimes hook is simpler.

Best practices: size, SEO, and optimization

Optimal image size

Upload images at exactly the size needed on the page. If the image is in an 800 px column, there's no point uploading a 4000 px original. WordPress creates multiple sizes on upload (thumbnail, medium, large), but the original file is stored on the server and may be delivered to the browser when full is called.

Rule: before uploading, resize the image to the maximum display width (usually 1200-1600 px for the content area). Tools: Photoshop, Google's free Squoosh, the cwebp CLI utility.

Increasing the upload limit

By default, WordPress limits uploaded file size to 2 MB. For modern AVIF, this is rarely an issue (files are significantly smaller than JPEG), but when uploading a large PNG or animated WebP, the limit may interfere.

On many hosting providers, the limit can be changed through the control panel. For example, in Cloudways, go to Server Management → Settings and Packages. On GoDaddy, through cPanel; on Media Temple, by editing php.ini; and with WP Engine, you need to contact support. If you don't have direct access to server settings, add this to wp-config.php:

1define( 'WP_MEMORY_LIMIT', '256M' );

This increases the PHP memory limit and indirectly raises the upload threshold.

Image SEO: alt text and file names

Search engines don't "see" images; they read their attributes. Alt text is an image description that gets indexed and read by screen readers.

Rules for good alt text:

  • Describe what's in the image in the context of the post. Not "screenshot," but "Cloudways control panel with Upload Size field highlighted."
  • 4-8 words, in English, with the section keyword.
  • Don't start with "Image of…" or "Picture of…"
  • For decorative images, leave alt="".

File name matters too. IMG_20241015_142302.jpg tells the search engine nothing. wordpress-image-format-comparison-chart.png does. Rename files before uploading.

Image optimization plugins

Manual optimization of each file takes time. Plugins automate the process: they compress, convert to WebP/AVIF, and serve the browser the optimal format. According to WPShout tests (2025), the top 4 are:

Plugin

Free limit

WebP

AVIF

CDN

Feature

Smush

∞ (lossless compression)

Most popular, simple interface

EWWW Image Optimizer

∞ (local compression)

Local processing - files don't leave for a third-party server

Imagify

20 MB/month

Aggressive compression, good conversion

Optimole

5,000 visits/month

Cloud service: compression + CDN + adaptive sizes

A more complete overview of optimization plugins is in our separate article.

Analytics-based strategy

Google Analytics (or Matomo) shows which devices and browsers visitors use. This determines which format should be primary. For example, if most of your audience uses the latest Chrome and Safari versions, AVIF is justified, and you can set up WebP fallback via a plugin for the rest.

If many visitors have iPhones on iOS 15 and older, AVIF won't work, and the primary format should be WebP with JPEG as insurance. We have a detailed guide with three methods on how to serve WebP images in WordPress, from CDN to manual <picture>.

Video: AVIF and WebP in WordPress in practice

This short video shows the process of converting images to AVIF and WebP directly in the WordPress admin and compares sizes before and after:

The AVIF format provides compression significantly better than WebP, with the difference especially noticeable in photos with smooth gradients and lots of detail. WordPress 6.5+ supports AVIF natively, without plugins.

⁉️🤔 Frequently asked questions

What's the difference between lossy and lossless compression?

Lossy algorithms remove data imperceptible to the eye (JPEG, AVIF lossy, WebP lossy). The file is small, but quality degrades with each resave. Lossless preserves every pixel as-is (PNG, GIF, AVIF lossless, WebP lossless). The file is larger but ideal for graphics with text. For content photos, use lossy (AVIF quality 50-70 or WebP quality 75-85), and the size will shrink by several times. Leave lossless for logos and screenshots where sharpness matters.

Which format should I choose for screenshots in 2026?

AVIF in lossless mode or quality 90+. Screenshots need readable text, and lossless AVIF preserves sharpness at PNG level while the file weighs significantly less. If your site runs WordPress older than 6.5, use WebP lossless as primary with PNG as fallback.

Test it yourself: take a screenshot of the admin panel, save it as PNG, WebP lossless, and AVIF lossless. Visual difference: zero. But on a page with a dozen and a half screenshots, the megabyte difference is already noticeable for LCP.

Do I need an optimization plugin if WordPress itself supports WebP and AVIF?

WordPress supports uploading WebP and AVIF but doesn't automatically convert JPEG/PNG to modern formats. If you're uploading ready-made WebP/AVIF, you don't need a plugin. If your sources are in JPEG/PNG, a plugin converts them on upload and serves the browser the optimal format.

Plus, plugins solve the fallback task: they generate <picture> with multiple sources for different browsers. Without a plugin, you'd have to do this manually or hope all visitors use browsers that support AVIF (which isn't the case yet).

WebP or AVIF: which should I choose right now?

AVIF as primary, WebP as fallback. AVIF wins in compression (noticeably better than WebP), quality (HDR, wide color gamut), and browser support, which now includes Chrome 85+, Firefox 93+, Safari 16+, and Opera 71+. The only "but" is older iOS devices: iPhone X and older on iOS 15 won't display AVIF. But their share is dropping, and plugins like EWWW and Optimole automatically serve them WebP.

If your analytics show a notable share of iOS 15 and older, make WebP the primary format with AVIF as an option "for those who can." For everyone else: AVIF now, WebP as backup.

Can I use SVG for a logo in WordPress?

SVG is the ideal format for logos: infinite scaling and microscopic size (2-5 KB). But WordPress blocks SVG due to XSS attack risk (SVG can contain embedded JavaScript). Use the Safe SVG plugin (safe uploading), which sanitizes each uploaded file and removes potentially dangerous code. After that, SVG can be uploaded directly to the media library and used like any other format.

What to use on WordPress in 2026: the bottom line

Format choice comes down to three rules. Photos and screenshots: AVIF (priority) or WebP, lossy compression quality 70-85. Logos and icons: PNG or AVIF lossless + SVG via Safe SVG. Animations: WebP instead of GIF, size savings by several times.

Don't put all your eggs in one format basket. The ideal strategy: AVIF → WebP → original JPEG/PNG, three layers via <picture> or a plugin. Nearly all visitors will get AVIF/WebP, the rest will get the classic format, and no one will see a broken icon.

Set up automatic optimization once (through EWWW for local processing or Optimole for a cloud service with CDN) and forget about manual compression. Check analytics quarterly: the share of old browsers is dropping, and soon AVIF will be a format without caveats.