How to Add Images to WordPress
Images are an important part of a modern website. They can make WordPress articles easier to understand, break up large blocks of text, showcase products, and create a more engaging experience for visitors.
WordPress provides several ways to add images to your website. You can upload images directly while writing a post or page, select previously uploaded images from the Media Library, create galleries, or use images as featured images.
In this guide, we’ll explain how to add images to WordPress, how to edit and optimize them, how to use alternative text, and how to avoid common image-related problems.
Why Are Images Important on a WordPress Website?
A well-chosen image can communicate information much faster than a large block of text.
Images can be used to:
- Explain tutorials and instructions
- Showcase products and services
- Illustrate blog posts
- Create visual branding
- Display screenshots
- Improve page readability
- Create featured images
- Build image galleries
However, images should be used appropriately. Uploading too many large images can increase page size and negatively affect loading performance.
Supported Image Formats in WordPress
WordPress supports several common image formats.
Some frequently used formats include:
| Format | Common Use |
|---|---|
| JPEG/JPG | Photographs |
| PNG | Graphics and images requiring transparency |
| GIF | Simple animations |
| WebP | Optimized web images |
| AVIF | Modern, highly compressed images |
The exact formats supported can depend on your WordPress version, hosting environment, and server configuration.
For most websites, WebP and AVIF can provide useful compression while maintaining good visual quality, provided your website and workflow support them.
How to Add an Image to a WordPress Post
The easiest way to add an image is directly from the WordPress post editor.
Step 1: Log in to WordPress
Log in to your WordPress Dashboard.
Usually, the administration area is available at:
https://example.com/wp-admin/
Replace example.com with your own domain.
Step 2: Open a Post
From the Dashboard, go to:
Posts → Add New Post
You can also open an existing post by going to:
Posts → All Posts
and selecting the post you want to edit.
Step 3: Add an Image Block
Inside the WordPress editor, click the + button to add a new block.
Search for:
Image
Select the Image block.
You will generally see options such as:
- Upload
- Media Library
- Insert from URL
Step 4: Upload an Image
Click Upload to select an image from your computer.
Locate the image file and select it.
WordPress will upload the image to your Media Library and insert it into your post.
For example, if you are writing a tutorial about WordPress installation, you could upload a screenshot showing the installation process.
How to Add an Existing Image From the Media Library
If an image has already been uploaded to WordPress, you don’t need to upload it again.
In the Image block:
- Click Media Library.
- Find the image.
- Select it.
- Click Select.
The image will be inserted into your post.
Using the Media Library can help prevent unnecessary duplicate uploads.
How to Add an Image Using a URL
WordPress can also insert images using a URL in supported situations.
Select the Image block and choose the option to insert from a URL.
Enter the complete image URL, for example:
https://example.com/images/example.jpg
However, for images that you own and manage, uploading them to your own Media Library is generally preferable.
How to Add an Image to a WordPress Page
The process is almost identical for pages.
Go to:
Pages → Add New Page
or open an existing page.
Then:
- Click the + button.
- Select Image.
- Upload an image or select one from the Media Library.
- Add alternative text.
- Adjust the image settings.
- Save or publish the page.
How to Add an Image to the Media Library
You don’t have to upload an image while editing a post.
You can upload images directly to the Media Library.
Go to:
Media → Add New
Click Select Files and choose one or more images from your computer.
After uploading, the images become available in your Media Library and can be inserted into posts or pages later.
How to Add Alt Text to an Image
Alternative text, commonly called alt text, describes an image in text form.
It can be useful when an image cannot be displayed and helps assistive technologies communicate the image’s purpose to users.
After selecting an image, find the Alt Text field in the image settings.
For example, instead of:
image123.jpg
you could use descriptive alt text such as:
WordPress dashboard showing the Posts menu
Good alt text should describe the image accurately and naturally.
Don’t fill alt text with unrelated keywords.
How to Add a Caption to an Image
A caption can provide additional context below an image.
For example:
WordPress Dashboard showing the Media Library
To add a caption:
- Select the image.
- Click the caption area.
- Enter your caption.
Captions are especially useful for screenshots, charts, diagrams, and images that require explanation.
How to Align an Image
WordPress provides image alignment and layout options depending on the editor and theme.
You may be able to position an image:
- Left
- Center
- Right
- Full width
- Wide width
The available options can vary depending on your active theme.
Avoid using alignment simply for decoration if it makes the content harder to read.
How to Resize an Image
After selecting an image, you can adjust its displayed dimensions using the image settings.
You can also resize an image before uploading it.
For example, if you have a very large photograph that will only appear at 800 pixels wide, uploading a much larger version may unnecessarily increase the page size.
The best image dimensions depend on where the image will be displayed.
How to Add a Link to an Image
Images can also link to another page, website, document, or media file.
To add a link:
- Select the image.
- Click the link option.
- Enter the destination URL.
- Confirm the link.
For example, a product image could link to its product page.
Make sure linked images have a clear purpose so visitors understand what will happen when they click them.
How to Add a Featured Image
A featured image is the primary image associated with a WordPress post.
Depending on your theme, it may appear:
- At the top of the post
- On the blog homepage
- In category pages
- In related posts
- In search results
- In social sharing previews
To add a featured image:
- Open the WordPress post.
- Locate the Featured Image section.
- Click Set Featured Image.
- Select an existing image or upload a new one.
- Save the post.
The exact appearance of the featured image depends on your theme.
How to Replace an Image
If you need to replace an image inside a post:
- Open the post or page.
- Select the image.
- Use the image replacement option.
- Select a different image from the Media Library or upload a new one.
- Save or update the content.
Check the page after replacing the image to ensure the layout still looks correct.
How to Delete an Image From a Post
To remove an image from a post:
- Open the post.
- Select the image.
- Remove the Image block.
This removes the image from that particular post.
It does not necessarily delete the original file from the Media Library.
How to Delete an Image From the Media Library
If you want to permanently remove an uploaded image:
Go to:
Media → Library
Select the image you want to remove and use the deletion option.
Be careful when deleting media files because the same image may be used on multiple pages or posts.
Removing it from the Media Library can cause broken images wherever the file was previously used.
How to Create an Image Gallery in WordPress
WordPress also allows you to display multiple images as a gallery.
To create a gallery:
- Open a post or page.
- Click the + button.
- Search for Gallery.
- Select the Gallery block.
- Upload images or select them from the Media Library.
- Arrange the images as required.
- Adjust the gallery settings.
- Save or publish the content.
Galleries can be useful for:
- Photography websites
- Portfolio websites
- Events
- Product showcases
- Travel websites
- Project presentations
How to Optimize Images Before Uploading
Image optimization is important because large image files can increase page size.
Before uploading an image, consider the following.
Resize Large Images
Don’t upload a 5000-pixel-wide image if the website only needs a much smaller version.
Compress Images
Compression can reduce file size while maintaining acceptable image quality.
Choose the Appropriate Format
Use a format appropriate for the type of image.
For example:
- JPEG can work well for photographs.
- PNG can be useful for graphics requiring transparency.
- WebP and AVIF can provide efficient modern web delivery when supported by your setup.
Remove Unnecessary Metadata
Some image files contain metadata that may not be necessary for website visitors.
Removing unnecessary metadata can reduce file size in some cases.
How to Optimize Images for SEO
Images can contribute to your website’s search visibility, but simply uploading an image doesn’t guarantee SEO benefits.
Follow these practices:
Use Descriptive File Names
Instead of:
IMG0001.jpg
use something meaningful, such as:
wordpress-admin-dashboard.jpg
Write Useful Alt Text
Describe the image accurately when alternative text is appropriate.
Use Relevant Captions
Add captions when they provide useful information.
Optimize Image Size
Smaller files can help improve page performance.
Keep Images Relevant
Use images that support the surrounding content.
How to Make WordPress Images Mobile-Friendly
An image that looks good on a desktop may not look the same on a mobile device.
Responsive WordPress themes generally adjust images based on the available screen width.
When adding images:
- Avoid unnecessarily fixed dimensions.
- Preview pages on mobile.
- Use appropriately sized images.
- Avoid extremely wide images that force horizontal scrolling.
Your theme and WordPress configuration also influence how images are displayed.
How to Add Images to the WordPress Header or Site Design
Some WordPress themes allow you to add images to areas such as:
- Site logo
- Header
- Footer
- Background
- Hero section
The exact process depends on your theme.
For block themes, many design changes can be managed through:
Appearance → Editor
For other themes, image and header options may be available through the Customizer or theme-specific settings.
Common WordPress Image Problems
Image Upload Failed
If an image cannot be uploaded, check:
- File size
- File format
- Hosting storage
- WordPress upload limits
- Server configuration
- File permissions
Your hosting provider may impose limits on upload size.
Image Looks Blurry
A blurry image may be caused by:
- Using a low-resolution source image
- Excessive compression
- Enlarging a small image
- Theme image resizing
- Browser or caching issues
Use a suitable source image and avoid enlarging images beyond their useful resolution.
Image Is Too Large
If an image takes up too much space, resize it or adjust its displayed dimensions.
Also check whether the original file is unnecessarily large.
Image Is Not Showing
If an image doesn’t appear, check:
- Whether the image file still exists.
- Whether the image URL is correct.
- Whether the Media Library contains the file.
- Whether a caching or optimization plugin is interfering.
- Whether server permissions are correct.
- Whether the CDN is serving the file correctly.
WordPress Shows a “File Type Not Permitted” Error
WordPress restricts certain file types for security reasons.
If a particular image format isn’t accepted, verify that the format is supported by your WordPress version and hosting configuration.
Avoid bypassing file-type restrictions unless you understand the security implications.
Best Practices for Managing WordPress Images
Follow these practices to keep your Media Library organized and your website efficient:
- Use descriptive file names.
- Resize oversized images before uploading.
- Compress images where appropriate.
- Use modern image formats when supported.
- Add meaningful alt text when appropriate.
- Avoid uploading duplicate images unnecessarily.
- Use relevant featured images.
- Keep backups of important media.
- Review unused media periodically.
- Test image display on desktop and mobile devices.
Frequently Asked Questions
Can I add multiple images to a WordPress post?
Yes. You can add multiple Image blocks or use a Gallery block to display several images together.
What is the best image size for WordPress?
There is no single image size that is ideal for every website. The appropriate dimensions depend on where the image will be displayed, your theme, and the visitor’s screen size.
Should I compress images before uploading them?
Yes. Compressing appropriately sized images can reduce file size and help improve website performance.
What is alt text in WordPress?
Alt text is a text description associated with an image. It can help communicate the image’s purpose when the image cannot be viewed and can support accessibility.
Can I edit images directly in WordPress?
WordPress provides basic image editing capabilities, while more advanced editing usually requires an external image editor or specialized plugin.
Can I use images from Google on my WordPress website?
Finding an image through Google does not automatically give you permission to use it. Use images that you own, have permission to use, or are appropriately licensed for your intended purpose.
Conclusion
Adding images to WordPress is a simple way to improve the visual quality and usefulness of your website. You can upload images directly from the post or page editor, select existing files from the Media Library, create galleries, or assign featured images to posts.
For the best results, focus not only on adding images but also on optimizing their size, choosing appropriate formats, writing useful alt text, and ensuring they work properly on mobile devices.
A well-managed image library combined with optimized images can help create a faster, more accessible, and more engaging WordPress website.