Custom Image Sizes

Add custom image sizes beyond WordPress defaults. Create exact dimensions for hero banners, product thumbnails, or any layout requirement — no code needed.

Use Cases

  • Create 450×300px hero images to match your theme’s exact design specs
  • Generate 1200×630px images for perfect Facebook and Twitter share previews
  • Add breakpoint-specific sizes for optimal responsive image performance

How It Works

  1. Add a custom size with name and dimensions
  2. Choose whether to crop or scale
  3. New uploads automatically generate this size
  4. Regenerate thumbnails for existing images

Where to Find It

Configure in Switchboard → Media → Custom Image Sizes. The settings panel shows:

  • WordPress Default Sizes — Thumbnail, Medium, Large (managed in Settings → Media)
  • Theme/Plugin Sizes — Registered by your theme or plugins (read-only)
  • Your Custom Sizes — Sizes you create (editable)

Adding a New Size

  1. Enter a Size Name (lowercase, underscores, e.g., hero_banner)
  2. Set Width in pixels
  3. Set Height in pixels
  4. Choose whether to Crop to exact dimensions
  5. Click Add Image Size

Size Name Format

Names must use:

  • Lowercase letters
  • Numbers
  • Underscores

Examples: product_thumb, hero_image, gallery_large, card_300x200

Crop vs Scale

ModeWhat HappensBest For
Crop OFFImage fits within dimensions, aspect ratio preservedFlexible layouts
Crop ONImage fills exact dimensions, edges may be cutFixed-size containers

Crop Example

Original image: 1600×900 (16:9 ratio) Custom size: 400×400 (1:1 square)

  • Without crop: 400×225 (maintains ratio, fits within 400×400)
  • With crop: 400×400 (exact square, sides trimmed)

Proportional Sizing

Set one dimension to 0 for proportional scaling:

WidthHeightResult
8000800px wide, height proportional
0600600px tall, width proportional
800600Fits within 800×600 (or crops to exact)

Common Size Presets

Here are useful sizes for common needs:

NameDimensionsCropUse Case
og_image1200×630YesOpen Graph/social sharing
hero_banner1920×600YesFull-width hero sections
card_thumb400×300YesBlog post cards
gallery_square600×600YesInstagram-style galleries
product_large800×0NoProduct detail images

Using Custom Sizes

Once created, custom sizes appear in:

  • Block Editor: Image block size selector
  • Classic Editor: Media insert size dropdown
  • Theme code: the_post_thumbnail('your_size_name')
  • PHP functions: wp_get_attachment_image($id, 'your_size_name')

Applying to Existing Images

New sizes only affect future uploads. For existing images:

  1. Add your custom sizes here
  2. Go to the Regenerate Thumbnails module
  3. Run the regeneration process

This creates the new sizes for all existing images.

Editing and Deleting

Edit a size: Click Edit, modify values, click Add (same name updates existing)

Delete a size: Click Delete. Existing thumbnails at that size remain on disk but new uploads won’t create them.

FAQ

Why aren’t my sizes showing in the block editor?Sizes with very small dimensions or unusual aspect ratios may be filtered out by the editor. Try using sizes with both dimensions above 100px.
Can I modify WordPress default sizes?Thumbnail, Medium, and Large are managed in Settings → Media. This module is for adding new sizes beyond those defaults.
Do I need to regenerate thumbnails?For new uploads: No, sizes are generated automatically. For existing images: Yes, use the Regenerate Thumbnails module.
What happens if I delete a custom size?
  • Future uploads won’t create that size
  • Existing thumbnails at that size remain until you delete them
  • References to that size will fall back to the nearest available size
Can I have unlimited custom sizes?Technically yes, but each size increases storage usage and upload time. Add only sizes you actually use. 5-10 custom sizes is reasonable.
Are my sizes kept if I deactivate the plugin?The size definitions are stored in your database. If you deactivate the module, sizes won’t be generated for new uploads, but existing thumbnails and the settings remain.
PRO

Get access to all 147 modules with a single license

Upgrade to Pro