How to Add and Edit Images in WordPress (Media Library Guide
Learn how to add images to WordPress, insert them in posts, crop and resize, and place background images using the WordPress editor.
Understanding the WordPress Media Library
The WordPress Media Library is where your site stores images, videos, and other media files. If you treat it like a searchable store, adding images becomes much easier. Every image upload creates an entry you can reuse across posts and pages.
In the WordPress admin, go to Media to browse what you already uploaded. You can also use search and filters to find older files. This matters when you replace an image in wordpress page and want to keep the same media reference.
Each image has a URL and settings you can reuse in the editor. WordPress also tracks metadata like file type and dimensions. When you plan edits, think about whether you need a new file or just a new crop.
- Use the Media Library to reuse assets across multiple pages.
- Keep original files so you can recrop without quality loss.
- Use descriptive file names to make future edits faster.

Methods to upload images in WordPress
There are two common ways for how to add an image to wordpress. You can drag and drop files into the Media area or use the Add Media button inside the editor. Both methods create a new Media Library item.
Drag-and-drop image upload is quick when you already have files open on your computer. In the Media Library screen, drop one or more files and WordPress uploads them. This method is best for batches, like when you update a whole landing page section.
The Add Media button works well when you know exactly where the image should appear. You can upload first, then insert it immediately into your block. It also supports selecting existing images from the library.
To upload with the editor, place your cursor, then open the + Add Media panel. Choose Upload or Media Library. After upload, select the image and confirm insertion into the post.
- Open the post or page in the block editor.
- Click + where you want the image block.
- Select Image, then choose Upload.
- Wait for the upload to finish, then confirm the insert.

Insert images into posts and pages with the block editor
When people ask how to insert image in wordpress, they usually mean inserting into a specific post or page. In WordPress, you do that with the WordPress image block. Once the block exists, you can adjust size, alignment, and later replace the underlying media.
Start by opening the page in the editor. Click the + button, then choose the Image block. Upload a new image or select one from the Media Library.
After insertion, click the image to reveal block settings. You can also use the toolbar controls to move or align the image. This is where how to center an image in wordpress usually gets set quickly.
If you want a structured layout, consider gallery and slideshow blocks. These blocks let you place multiple images in one area without manually repeating image blocks. They also help keep spacing consistent across the page.
- Use the image block for single-image layouts.
- Use the gallery block for grids of related images.
- Use the slideshow block for small sets of images.

Edit images in WordPress: resize, crop, align, and replace
WordPress editing tools handle basic changes without leaving the admin. These edits usually focus on image resizing and cropping. To edit, click the image block, then look for image options in the block toolbar or settings panel.
Resizing is typically about changing how big the image appears on the page. Use the available size options, or drag the edges if your editor supports it. If you later notice layout shifts, revert to a fixed block width and spacing.
Cropping cuts out parts of the image to fit your design. You can crop to a square, a banner ratio, or just remove distractions. When you crop image in wordpress page content, keep an eye on important details like faces and text areas.
Alignment in WordPress lets you position the image relative to the block container. You can center, align left, or align right depending on theme support. If you need a consistent look, choose one alignment style and reuse it across similar sections.
Replacing an image in wordpress is often cleaner than uploading a new block and losing formatting. With the image block selected, open the media picker and choose a different file. WordPress then keeps the block settings like alignment and size, as supported by your theme.
- Resize: change the display size in the editor.
- Crop: trim the image to the needed framing.
- Align: control placement within the content area.
- Replace: swap the media while keeping the block.
| Goal | What to do in the editor | Common mistake |
|---|---|---|
| how to resize an image in wordpress | Select the image block, then choose a size. | Scaling too large and slowing the page. |
| how to crop image in wordpress | Use crop controls on the selected image. | Cropping out key details near edges. |
| how to center an image in wordpress | Set alignment to center for that block. | Centering an image but not the container. |

Common image adjustments and troubleshooting tips
Beyond crop and resize, most issues come down to dimensions and layout behavior. For image optimization for web, aim to upload a file that matches what you need on the page. If your theme displays an image at 800px wide, uploading a 4000px file can waste bandwidth.
If an image looks blurry, it may be scaled up beyond its original pixel width. WordPress can crop and resize the display, but it cannot create detail that is not in the source file. A sharp file at the right size usually looks better.
Another common problem is strange spacing around an image block. This often happens when margin or padding settings come from the theme’s styles. Try toggling alignment, or test with a different block type like a group or column layout if your theme supports it.
Here are quick fixes for typical problems people hit when they add or edit media. Use them in the order shown to save time.
- Check dimensions: compare the image’s aspect ratio with your crop target.
- Check alignment: center can depend on theme layout rules.
- Check block type: a cover or group layout may use different sizing logic.
- Replace instead of stacking: if formatting breaks, swap the media on the same block.
If images fail to load, refresh the editor and confirm the file uploaded successfully. Also check for file type support. Most WordPress setups handle JPG, PNG, and WebP, but uncommon formats can fail.
Additional placement techniques, including background images
Sometimes you need more than a simple image block. For example, you can add background images for hero sections, callouts, or full-width banners. This is where how to add background image in wordpress page comes into play.
In many WordPress editors, you can use a Cover block to set a background image. The cover block can display a background image with overlay text and an adjustable focal point. If your theme supports it, you can also use sections with background controls.
When you add a background image, think about readability. Use enough contrast between the text and image by adding a dark overlay if the block offers it. Also choose a focal area that keeps the message clear on both desktop and mobile.
To set a background image, pick a block that supports backgrounds, then select an image from the Media Library. If your editor offers “fill,” use it to cover the area evenly. If you need more control, switch to “fit” so the full image is visible without cropping.
For layout variety, image blocks can also live inside groups or columns. That lets you create side-by-side sections without manual spacing hacks. Use these tools to maintain consistent margins and alignments across the page.
If you want a quick way to build a page section, start with a cover block for the hero. Then add one or two normal image blocks beneath it for supporting visuals. This pattern keeps your layout predictable while still using strong visuals.
Frequently asked questions
- How do I add an image to WordPress using the editor?
- Open a post or page, then add an Image block. Upload a file or pick one from the Media Library, then confirm the insert.
- How do I insert an image in WordPress and keep it centered?
- Insert the Image block, then set alignment to center in the block settings. If it still shifts, check the theme container width and block layout.
- How can I resize an image in WordPress without losing quality?
- Resize the image display using the block size controls. For best clarity, upload a source file close to the final display width.
- How do I crop an image in WordPress?
- Select the image block, then open the crop tool in its editor controls. Drag the crop box to the framing you want and save the change.
- How do I add a background image in WordPress page layouts?
- Use a Cover block or another block that supports backgrounds. Choose an image from the Media Library, then adjust how it fills the area.
- What should I do if an uploaded image looks blurry or misaligned?
- Check the image dimensions and avoid scaling up far beyond the original pixels. Then review alignment settings and try replacing media on the same image block.