Back in 2021, we covered the basics of how images are used in WordPress. A lot has changed since then, so we’re revisiting this topic to highlight new tools, best practices, and techniques for working with images in WordPress. We’ll discuss:
- What to do BEFORE you upload an image
- Different image file types and how to decide which to use
- Choosing the right aspect ratio
- Optimizing your images for better performance
- How to work with images on Pages, Posts, etc.
- Managing your Media Library
Image File Types
Here is a detailed comparison table for the main image formats in WordPress 6.8.3, focusing on lossless/lossy compression, impact of compression on resolution, best use cases, core pros/cons, plugin needs, and relevant notes:
|
Format 1645_de4b9e-aa> |
Lossless 1645_c53d5b-c3> |
Lossy 1645_65f441-1a> |
Compression Impact 1645_5521af-84> |
Best For & Use Case 1645_f7feec-33> |
Pros 1645_6ad203-12> |
Cons 1645_6bda63-be> |
Plugin Needed 1645_eeb786-b5> |
Notes 1645_98597a-35> |
|---|---|---|---|---|---|---|---|---|
|
JPEG/JPG 1645_c1eb30-35> |
No 1645_cd8fbb-c7> |
Yes 1645_a7d4e4-d3> |
High compression creates blur and artifacts, can reduce detail and sharpness 1645_d42716-05> |
Photos, blog images, social media 1645_142103-a7> |
Small file size, universal support 1645_f399ac-24> |
No transparency, lossy, banding 1645_286107-85> |
No 1645_ea58ac-ee> |
Default compression adjustable (WP default: 82%) 1645_199b1c-0c> |
|
PNG 1645_ff4a71-1e> |
Yes 1645_82dd0a-5a> |
No 1645_f8ca84-4b> |
No loss of detail at any compression level 1645_0a6e3e-38> |
Logos, graphics, images needing alpha 1645_156e8a-f7> |
Lossless, supports transparency 1645_75482f-81> |
Large files at high resolutions 1645_e59ea2-07> |
No 1645_c19faf-46> |
Best for flat art, icons 1645_7821d5-4e> |
|
GIF 1645_ccad4a-0e> |
Yes* 1645_fe2ea3-37> |
No 1645_0ec89d-22> |
Indexed palette, color quantization may create dither/fade 1645_4cdbbb-f1> |
Simple animation, small icons 1645_093ddf-aa> |
Simple animation, universal support 1645_fb04d3-4b> |
256-color limited, poor for photos 1645_d9ebf9-3d> |
No 1645_292a36-1a> |
Only lossless per palette, not suitable for detailed images 1645_f1c2a5-f3> |
|
WebP 1645_a09c57-75> |
Yes 1645_1ee3cd-27> |
Yes 1645_5e382f-16> |
Lossy: minor quality loss at 80-90%; lossless: full pixel fidelity 1645_a07002-dd> |
Modern web images, graphics, animation 1645_0f3f42-b5> |
Smallest file size, alpha, animation 1645_a329f0-5b> |
Needs modern browsers/servers 1645_8052a9-ed> |
No 1645_aff564-12> |
Natively supported, best all-rounder for performance 1645_08bef9-68> |
|
AVIF 1645_32ec23-ff> |
Yes 1645_21d88e-33> |
Yes 1645_b5f30f-f8> |
Lossy: very high compression with less quality loss than JPEG/WebP; lossless: no loss 1645_de6e6a-05> |
Hi-res web images, HDR, banners 1645_9a6855-14> |
Smallest files, HDR, wide color, alpha 1645_d3f40c-f6> |
Needs latest browsers/hosts 1645_fa628b-82> |
No 1645_970aa4-ce> |
Native since 6.5+, requires PHP 8.1+ support 1645_b7d209-73> |
|
SVG 1645_2e1708-11> |
N/A 1645_07509a-11> |
N/A 1645_52fe84-51> |
Infinite scaling, no pixel loss ever 1645_c1d690-15> |
Scalable icons, logos, vector art 1645_aa5dfd-5f> |
Resolution independent, always crisp 1645_808756-6a> |
Security concerns (upload) 1645_1ce101-f6> |
Yes* 1645_176cd1-63> |
Plugin for upload (sanitization), no raster compression 1645_fb3a09-90> |
|
HEIC/HEIF 1645_030335-4d> |
No 1645_773eb5-6b> |
Yes 1645_4ac6e8-fe> |
Similar to JPEG, but higher compression at same quality 1645_6ba784-92> |
iPhone images, modern hi-res photos 1645_e4534f-03> |
Efficient, high quality 1645_010b75-d5> |
Limited browser support 1645_7d54d8-52> |
No 1645_272f49-e4> |
Natively accepted, converted for display by some hosts 1645_fd5d51-e7> |
- GIF is technically lossless per palette but restricted to 256 colors, so photographic images suffer from color loss and dithering.
- SVG is purely vector and not subject to pixel-based compression or loss.
- Plugin required for SVG upload due to security.
Compression notes: Lossy formats (JPEG, lossy WebP/AVIF, HEIC) have a direct tradeoff: more compression means smaller files but greater risk of visible blur, reduced detail, or color shifts. Adjusting the compression level lets you choose your preferred quality/size balance in WordPress or via plugins. Lossless formats preserve original resolution and color but produce larger files, especially at high detail.
🖼️ All About Images in WordPress – 2025 Update
1️⃣ Before You Upload an Image
A. Image Planning & Composition
- Decide where the image will appear – hero, thumbnail, gallery, background.
- Think orientation and composition (wide vs tall).
- Common aspect ratios (16 : 9, 4 : 3, 1 : 1, 9 : 16).
- Use the Focal Point tool to keep the subject visible in responsive crops.
B. Sizing and Resolution
- “Size on screen ≠ file size.”
- Typical targets: hero 1600-2000 px, blog 1200 px, thumb 400-800 px.
- Avoid multi-MB phone originals.
C. File Names & Metadata
- Descriptive, SEO-friendly names (
mystic-seaport-sunset-ct.jpg). - Lowercase, no spaces.
- Remove EXIF/GPS data for privacy.
D. Editing & Compression Before Upload
- Online compressors: ShortPixel Online · Squoosh
- Online editors: Photopea, Pixlr, BeFunky, Fotor, Ribbet.
- Batch resize / rename / crop before upload.
2️⃣ Choosing the Right File Type
| Format | Typical Use | Notes |
|---|---|---|
| JPEG/JPG | Photos | Small files, lossy |
| PNG | Logos, graphics, transparency | Lossless |
| GIF | Simple animations | Limited colors |
| SVG | Vector graphics | Needs plugin for safe upload |
| WebP | Modern alt to JPEG/PNG | Native support |
| AVIF | Newest format | Server support required; possible color shift |
| HEIC/HEIF | iPhone images | Convert before upload |
WP 6.8.3 supports: .png · .jpg · .jpeg · .gif · .webp · .heic · .heif · .svg (via plugin)
(Demo idea: grid showing same image in each format and file size.)
3️⃣ Optimizing Images for Performance
A. Compression & Lazy Loading
- Lossy vs lossless compression comparison.
- Native
loading="lazy"in WP core — disable for above-the-fold hero.
B. Optimization Plugins (Show and Compare)
C. CDN and External Delivery
- CDN advantages: speed, auto-resizing.
- Tools: Jetpack Site Accelerator, Cloudflare Images, Optimole CDN.
- Caution with external URLs (permissions & ownership).
4️⃣ How Images Are Used in WordPress
A. Featured Images (Post Thumbnails)
- How to set and display featured images.
- Where they appear – archives, related posts, social shares (Open Graph).
- Handling different aspect ratios per theme layout.
B. Images in Content
- Image block: alignment, duotone filters, focal point, link to file or page.
- Gallery block: grid or carousel layout, caption styles.
- Lightboxes: Gallery Block Lightbox, Meow Lightbox.
- Sliders / Slideshows: core Slideshow block (coming soon) or plugins (Slider Revolution, Kadence Slider, Spectra).
C. Background Images
- Cover block: background image with overlay text and opacity.
- Group block: set background image in block settings.
- Tips for contrast and readability.
D. Galleries & Grids
- Default Gallery block vs block-based plugins.
- Masonry or Justified layouts.
- Dynamic galleries by category or folder.
E. Reusable / Pattern Images
- Images inside patterns and templates.
- Site Editor backgrounds and global styles.
F. Special Uses
- Logos & Site Icons (in Site Editor > Site Logo).
- Favicon (“Site Icon” in Customizer or Site Editor Settings).
- Social media preview thumbnails (SEO plugins like Yoast or Rank Math).
(Demo idea: create a post with featured image + gallery + cover block background.)
5️⃣ Managing Your Media Library
- Upload methods: Media Library, drag-and-drop, Instant Images plugin (Unsplash, Openverse etc.).
- Organizing files: folders via FileBird / Media Library Organizer.
- Replacing and deleting (old testing images).
- Regenerating thumbnails after theme change.
- Bulk cleanup and checking unused media.
- Transferring media during import/export.
6️⃣ Accessibility & SEO Essentials
A. Alt Text and Captions
- Describe content and purpose; leave alt blank for decorative images.
- Captions vs alt text – different audiences (screen reader vs visual).
B. Licensing & Copyrights
- Safe sources: Openverse, WordPress Photos, Freepik, Freerangestock, Stockvault.
- Creative Commons vs commercial licenses.
- AI-generated image usage and attribution.
7️⃣ Maintenance & Troubleshooting
- Missing images after migration (search-replace URLs).
- External links and broken references.
- Update social media thumbnails for reshared posts.
- Media cleanup after redesign.
8️⃣ Advanced / Developer Corner (Quick Round)
srcsetandsizesresponsive attributes.add_image_size()and custom thumbnail registrations.theme.jsoncontrols for duotone and borders.- CSS
object-fit,aspect-ratio, and blend modes. - Color palette extraction from images (for design systems).
- Security for SVG uploads and user-submitted images.
9️⃣ Parking Lot / Optional Deep Dives
- AI-generated image creation and captioning (MightyShare.io).
- External storage (S3, Spaces).
- Watermarking or batch replacement tools.
- Advanced color palette workflows.
- Integration with patterns and style libraries.
🔚 Wrap-Up & Resource Handout
Checklist Recap
✅ Prepare before upload ✅ Use right file type ✅ Optimize performance
✅ Add alt text ✅ Manage Media Library ✅ Mind licensing
Resource Links
- Compression tools: ShortPixel · Squoosh
- Editors: Photopea · Pixlr
- Plugins: Meow Lightbox · Instant Images · Optimole · ShortPixel
- Stock sources: Openverse · WP Photos · Freepik · Freerangestock · Stockvault
- Video references: Brett in Tech – Top 10 Free Stock Photo Sites (2025)