How do I add images, videos, or galleries to my posts in WordPress?

Applies to: WordPress.org and WordPress.com
Last updated: May 2025


Problem

You want to add visual media—like images, videos, or photo galleries—to your posts or pages, but you’re unsure how to insert and manage them using the WordPress block editor.


Solution

WordPress uses a block-based editor, which makes it easy to insert and customize media content anywhere in your post or page.


Adding an Image

  1. Open a post or page in the editor
  2. Click the plus (+) button to add a new block
  3. Select the Image block
  4. Choose one of the following:
    • Upload a new image from your computer
    • Media Library to select an existing image
    • Insert from URL if the image is hosted elsewhere
  5. Once added, you can:
    • Add a caption
    • Choose alignment (left, center, right, wide)
    • Set alt text for accessibility and SEO
    • Adjust image size or dimensions

Adding a Video

  1. Add a new Video block
  2. Upload a video file (MP4 format recommended), select one from your media library, or embed a video from a third-party site

Tip: For best performance, avoid uploading large videos directly to your site. Instead:

  • Use the YouTube or Vimeo block
  • Paste the video URL (e.g., https://youtube.com/...) into a paragraph block and WordPress will auto-embed it

Adding a Gallery

  1. Add a Gallery block
  2. Upload or select multiple images from your Media Library
  3. Choose layout settings like:
    • Number of columns
    • Image crop settings
    • Link options (none, media file, or attachment page)
  4. Add a gallery caption if desired
  5. Click Publish or Update to save your changes

Media Management Tips

  • Use Media > Library to manage all uploaded files in one place
  • Always add alt text to improve SEO and accessibility
  • Optimize images for web before uploading (keep file sizes small)
  • Use plugins like Smush or ShortPixel for automatic image optimization

You may also like...