How to Add Images in WordPress
Adding images in WordPress is straightforward once you know where the tools live. Whether you are inserting a photo into a post, setting a featured image, or building a gallery, the process starts in the same place: the media library. This guide walks through every method you need, from the basics of uploading to fine-tuning alignment and alt text for better accessibility.
- How to Add Images in WordPress
- Uploading Images to the Media Library
- Method 1: Upload While Writing
- Method 2: Upload via the Media Library
- Inserting Images into Posts and Pages
- Setting a Featured Image
- Aligning and Sizing Images
- Adding Alt Text and Accessibility
- Creating a Gallery Block
- Common Issues When Adding Images
- Best Practices for Images in WordPress
More from this site
Keep reading the latest coverage
Uploading Images to the Media Library
Before you can place an image in content, it needs to be in your library. You can upload directly while editing a post or page, or manage files ahead of time from the dashboard.
Method 1: Upload While Writing
Open a post or page and click the plus icon to add a new block. Select the Image block. You will see three tabs: Upload, Media Library, and (if enabled) External. Drag a file from your desktop into the Upload tab, or click it to browse your folders. Once uploaded, the image appears in the block and you can add a caption, alt text, and adjust the size right there.
Method 2: Upload via the Media Library
Go to Media > Library in the sidebar. Click Add New at the top. Drag files or select them from your computer. Once the upload finishes, you can click into any image to edit its title, caption, alt text, and description before inserting it anywhere.
Inserting Images into Posts and Pages
After uploading, insertion happens in seconds. From the block editor, add an Image block and choose Media Library to pick a previously uploaded file. You can also paste a direct image URL into the Image block if the file is hosted externally, though uploading to your own library gives you more control over metadata and performance.
Setting a Featured Image
Scroll to the Featured Image panel on the right side of the editor. Click Set Featured Image, select a file from the library or upload a new one, and click Set Featured Image again. This image will appear at the top of posts, on archive pages, and in some theme layouts depending on your design.
Aligning and Sizing Images
Once an image is in place, use the block toolbar to change its alignment. Choose Left, Center, or Right to wrap text around the image, or select Full Width and Wide Width if your theme supports it. The Size dropdown offers thumbnail, medium, large, and full size, plus any custom sizes your theme has registered.
Adding Alt Text and Accessibility
Alt text is essential for accessibility and search visibility. When you select an image in the editor, the Alt Text field appears in the right sidebar. Describe what is in the image in a way that makes sense if the image does not load. Keep it concise and avoid keyword stuffing; write for humans first.
Creating a Gallery Block
To add multiple images at once, insert a Gallery block. Choose Upload or Media Library, select several images, and click Create a New Gallery. You can set columns, toggle random order, and link each image to its attachment page or a custom URL. This is useful for portfolios, product showcases, and image-heavy articles.
Common Issues When Adding Images
If an image does not appear after uploading, check the file size — some hosts limit uploads to a few megabytes. If the image is too large, resize it before uploading or use a plugin to generate optimized copies. For alignment problems, make sure you are not overriding styles with custom CSS, and verify that your theme supports the width and size you have chosen.
Best Practices for Images in WordPress
- Resize images before uploading to reduce file size.
- Use descriptive file names before you upload.
- Always fill in alt text for every image.
- Use the WebP format where your host supports it.
- Lazy load images when your theme or a plugin supports it.
- Remove unused images from the media library to keep things tidy.
Adding images in WordPress is a core skill that affects both the look of your site and how search engines understand your content. Master the upload, insertion, and alignment steps, and your posts will be faster, more accessible, and more engaging.