WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code Required / Thumbs and various image sizes. How to change image resize rules in theme.

Thumbs and various image sizes. How to change image resize rules in theme.

7159 views 0
  • Why Are So Many Thumbnails Generated?
  • Change Theme Default Sizes from Theme Options
  • Changing Image Compression in WordPress
  • Regenerating Thumbnails
  • Theme Image Sizes Explained
  • Want to Remove Some Image Sizes?

Why Are So Many Thumbnails Generated?

Every time you upload an image, WordPress and WPResidence create multiple thumbnail sizes.

These resized images are used in different parts of the website, such as:

  • Agent lists
  • Property lists
  • Property sliders
  • Blog previews
  • Featured property widgets
  • Map infoboxes
  • User profile images

Why these thumbnails are created:

  • They help performance: smaller images load faster than full-size images.
  • They avoid loading a large image where only a small image is needed.
  • They keep cards, sliders, widgets, and lists aligned with the correct image size.
  • WordPress cannot know in advance where each uploaded image will be used, so the needed thumbnail sizes are generated once and reused where needed.

Change Theme Default Sizes from Theme Options

Some default image size options can be managed from Theme Options.

After changing image size options, the new values apply to images generated after the change.

For existing images, you must regenerate thumbnails so WordPress can recreate the resized images with the new settings.

Changing Image Compression in WordPress

When WordPress creates resized images, it can apply image compression. This helps reduce file size and improve loading speed.

If you want resized JPEG images to keep a higher quality, you can change the WordPress image quality setting with a small code snippet.

WordPress documents the image quality filters here:

https://developer.wordpress.org/reference/hooks/jpeg_quality/

https://developer.wordpress.org/reference/hooks/wp_editor_set_quality/

How to set JPEG quality to 100%

Add the code below in the WPResidence child theme file:

wpresidence-child/functions.php

// Set JPEG quality to 100%.
add_filter( 'jpeg_quality', function( $quality ) {
    return 100;
} );

// Set image editor quality to 100.
add_filter( 'wp_editor_set_quality', function( $quality ) {
    return 100;
} );

Steps:

  1. Open your child theme folder.
  2. Edit the functions.php file.
  3. Add the code above.
  4. Save the file.
  5. Regenerate thumbnails so existing images can use the new quality setting.

Important: Setting image quality to 100% can make image files larger. This can increase storage usage and may slow down pages with many images.

Regenerating Thumbnails

If you change image sizes or image quality settings, install and run a thumbnails regeneration plugin.

You can use:

Force Regenerate Thumbnails

This plugin can:

  • Delete old thumbnails.
  • Regenerate the thumbnail sizes defined by WordPress and the theme.
  • Help fix missing, outdated, or wrongly sized images.

Run thumbnail regeneration after:

  • Changing theme image size settings
  • Changing image quality/compression settings
  • Updating images that look cropped incorrectly
  • Changing theme layouts that use different image sizes

Theme Image Sizes Explained

WPResidence defines specific thumbnail sizes for different parts of the site in:

wpresidence/libs/general-settings.php

Do not delete these sizes unless you know they are not used. Each size has a purpose in the theme layout. WordPress image size documentation: https://developer.wordpress.org/reference/functions/add_image_size/
add_image_size( 'user_picture_profile', 255, 143, true );

Used for the image uploaded in User Dashboard → My Profile.

add_image_size( 'agent_picture_single_page', 314, 180, true );

Used for the agent image on the single agent page.

add_image_size( 'agent_picture_thumb', 120, 120, true );

Used in agent lists or featured agent widgets.

add_image_size( 'blog_thumb', 272, 189, true );

Used for blog post thumbnails in blog lists.

add_image_size( 'blog_unit', 1110, 385, true );

Used for blog post slider images in full-width layouts.

add_image_size( 'slider_thumb', 143, 83, true );

Used for the small thumbnail in the property post slider.

add_image_size( 'property_featured_sidebar', 261, 225, true );

Used for the featured property widget in the sidebar.

add_image_size( 'blog-full', 940, 529, true );

Used for blog post slider images with sidebar.

add_image_size( 'property_listings', 525, 328, true );

Used for property units in lists. It can also be used for agent image units in lists.

add_image_size( 'property_full', 980, 777, true );

Used for the property page slider.

add_image_size( 'listing_full_slider', 835, 467, true );

Used for the property slider with sidebar.

add_image_size( 'listing_full_slider_1', 1110, 623, true );

Used for the property page slider without sidebar.

add_image_size( 'property_featured', 940, 390, true );

Used in the featured property shortcode.

add_image_size( 'property_full_map', 1920, 790, true );

Used in the theme slider.

add_image_size( 'property_map1', 400, 161, true );

Used for the property image in the map infobox.

add_image_size( 'widget_thumb', 105, 70, true );

Used in the latest listings widget.

add_image_size( 'user_thumb', 45, 45, true );

Used for the agent/user image in featured property areas.

add_image_size( 'custom_slider_thumb', 36, 36, true );

Used for the user profile image in the user menu.

set_post_thumbnail_size( 250, 220, true );

Used for the image thumbnail in the submission form.

Want to Remove Some Image Sizes?

You can remove unused image sizes only if you are sure they are not used by your website layout.

This is not recommended for most websites because those sizes are used by the theme in different layouts, widgets, sliders, and lists.

Before removing image sizes, keep in mind:

  • Performance may decrease: larger images may be loaded where smaller images should be used.
  • Layout issues may appear: property cards, sliders, and widgets may look uneven or broken.
  • Theme updates can overwrite changes: edits made directly in the parent theme files can be lost after an update.
  • Support is limited for custom code changes: removing theme image sizes is considered custom development.

If you are sure an image size is not used, a developer can remove the relevant add_image_size() line from:

wpresidence/libs/general-settings.php

A safer approach is to test this first on a staging site, then regenerate thumbnails and check all important pages:

  • Property list pages
  • Single property pages
  • Agent pages
  • Blog pages
  • Homepage sliders
  • Map infoboxes
  • Sidebar widgets
  • Mobile layout

For more details about WordPress image sizes, see:

https://developer.wordpress.org/reference/functions/add_image_size/

Technical how to | Custom Code Required

Related Articles

  • Technical: Change the Schedule Tour Email Text and the Form Default Message
  • Property list filter customization
  • Technical – How to Change the Minimum Image Dimensions for Property Uploads in WPResidence
  • Introduction to WPResidence Header Customization

Help Categories

  • 18Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 39Elementor Shortcodes Built-In
  • 46FAQ
  • 15Footer
  • 5Getting Started
  • 37Header
  • 2IDX & MLSImport
  • 6Installation & Setup
  • 24Installation FAQ
  • 23Maps & Location Settings
  • 21Multi-Language - Third Party Plugins
  • 6Other Third party Plugins
  • 21Pages
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 37Property Pages & Layouts
  • 31Search & Filtering
  • 162Technical how to | Custom Code Required
  • 8Technical: Actions and filters
  • 7Technical: Child Theme
  • 86Theme Options & Global Settings
  • 7Translations & Languages
  • 16WPBakery Shortcodes
  • 50WPEstate / WPResidence Translate Plugin
  • 51WPResidence / WPEstate CRM
  • 50WPResidence 5.0 Documentation
  • 9WPResidence Elementor Studio

Join Us On

Powered by WP Estate - All Rights Reserved
  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API