WP Residence Help WP Residence Help

  • WpEstate
  • How to Build Your Website
  • 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.

6637 views 0

Why Are So Many Thumbnails Generated?

Every time you upload an image, WordPress and the theme create multiple thumbnail sizes. These resized images are used in different sections of the website (like agent lists, property sliders, blog previews, etc.).

Why We Do This:

  • To improve performance: Smaller images are faster to load and display.
  • To avoid showing full-size images where only a small version is needed.
  • WordPress doesn’t know which images are used in which sections (e.g. an agent profile might be used in 3 places), so we generate all the thumbnails just once and use the ones we need.

Change theme default sizes from Theme Options

Changing Image Compression in WordPress

By default, WordPress compresses JPEG images to 85% quality when generating thumbnails.

If you want to keep your images at 100% quality, you can add a small code snippet to your child theme:

How to Disable Compression:
As per the WordPress documentation, this behavior can be modified using a custom filter:  https://developer.wordpress.org/reference/hooks/jpeg_quality/ .
By using this hook, the compression level can be changed, even set to 100%, so resized images retain the same quality as the originals.
​
If you wish images to be re-sized, but avoid the image compression, you can add the following code into the WpResidence Child Theme – functions.php
  1. Open your child theme folder.
  2. Edit (or create if missing) the functions.php file.
  3. Add this snippet anywhere inside functions.php (preferably near the top or bottom):

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

// For newer WordPress versions
add_filter( 'wp_editor_set_quality', function( $quality ) {
return 100;
});

  1. Save the file.
  2. Regenerate your thumbnails with a plugin like Regenerate Thumbnails to apply the new quality setting to existing images.

Regenerating Thumbnails

To update thumbnails after changing size or quality settings, install and run: Force Regenerate Thumbnails plugin – https://wordpress.org/plugins/force-regenerate-thumbnails/ 

This plugin:

  • Deletes old thumbnails.

  • Regenerates only the sizes defined in your theme.

  • Helps fix issues with missing or outdated images.

 Theme Image Sizes Explained

The WpResidence theme defines specific thumbnail sizes for different parts of the site in: wpresidence/libs/general-settings.php .

 Do not delete these unless you know they are not used. Each size serves a specific purpose. Help: http://codex.wordpress.org/Function_Reference/add_image_size

add_image_size(‘user_picture_profile’, 255, 143, true);
–> the image uploaded in user dashboard – my profile

add_image_size(‘agent_picture_single_page’, 314, 180, true);
–> image added as featured image – for single post page

add_image_size(‘agent_picture_thumb’ , 120, 120, true);
–> image in agent list or featured widget

add_image_size(‘blog_thumb’ , 272, 189, true);
–> image for blog post in lists of blog posts

add_image_size(‘blog_unit’ , 1110, 385, true);
–> image in blog post – slider full width

add_image_size(‘slider_thumb’ , 143, 83, true);
–> image in property post slider – the small thumb

add_image_size(‘property_featured_sidebar’,261,225,true);
–> image for featured property widget on sidebar

add_image_size(‘blog-full’ , 940, 529, true);

–> image in blog post – slider with sidebar
add_image_size(‘property_listings’ , 525, 328, true); // 1.62 was 265/163 until v1.12
–> image in property unit – used in lists. agent image unit, used in lists.

add_image_size(‘property_full’ , 980, 777, true);
–>property page slider

add_image_size(‘listing_full_slider’ , 835, 467, true);
–> image in property slider – with sidebar

add_image_size(‘listing_full_slider_1′, 1110, 623, true);
–>image in property page slider – no sidebar

add_image_size(‘property_featured’ , 940, 390, true);
–> image in featured property shortcode

add_image_size(‘property_full_map’ , 1920, 790, true);
–> image in theme slider

add_image_size(‘property_map1′ , 400, 161, true);
–> image property in infobox

add_image_size(‘widget_thumb’ , 105, 70, true);
–> image in latest listings widget

add_image_size(‘user_thumb’ , 45, 45, true);
–> image in featured property – agent/user image

add_image_size(‘custom_slider_thumb’ , 36, 36, true);
–> this is user profile image – user menu

set_post_thumbnail_size( 250, 220, true);
–> this is the submission form – image thumb

Want to Remove Some Image Sizes?

ou can delete unused sizes from the theme code, but keep in mind:

  • Performance may decrease: Larger images will slow down your site.

  • Layout issues may occur: Cards and image containers may look broken or uneven.

  • We can’t offer support for performance issues caused by removing thumbnails.

If you’re sure an image size isn’t used, you can remove the relevant add_image_size() line from general-settings.php. But double-check where that size appears in your theme first.

For more details on WordPress image resizing:
🔗 https://codex.wordpress.org/Function_Reference/add_image_size

Technical how to | Custom Code Required

Related Articles

  • Technical – How to Change the Minimum Image Dimensions for Property Uploads in WPResidence
  • Introduction to WPResidence Header Customization
  • Understanding WPResidence Header Types: An Overview
  • Customizing the WPResidence Logo Display

WP Residence Documentation

  • 1. General
    • How to Get Support
    • Get your buyer license code.
    • Use SSL / https
    • Server / Theme Requirements
  • 2. Installation
  • 3. Installation FAQ
  • 4. Advanced Search
    • Advanced Search Display Settings
    • Advanced Search Form
    • Geolocation Search for Half Map
    • Save Search Theme Options
    • Advanced Search Colors
  • 5. Agent, Agency & Developers
  • 6. Property Page
  • 7. Properties List
  • 8. Property Taxonomies
  • WpResidence Elementor Studio
  • 10. Blog Posts & Blog List
  • 11. Shortcodes
    • Contact Form
    • Featured Agency/Developer
    • Membership Packages
    • Testimonials
    • Google Map with Property Marker
    • Listings per Agent, Agency or Developer
    • Display Categories
    • Agent List
    • Recent Items Slider
    • Recent items
    • List Properties or Articles by ID
    • Featured Agent
    • Featured Article
    • Featured Property
    • Login & Register Form
    • Icon Content Box Shortcode
  • 12. Widgets
  • Theme Options
    • General Settings
    • User Types Settings
    • Appearance
    • Logos & Favicon
    • Header
    • Footer Style and Colors
    • Price & Currency
    • Property Custom Fields
    • Features & Amenities
    • Listing Labels
    • Theme Slider
    • Permalinks
    • Splash Page
    • Social & Contact
    • Map Settings
    • Pin Management
    • How read from file works
    • General Design Settings
    • Custom Colors Settings
    • Header Design & Colors
    • Mobile Menu Colors
    • User Dashboard Colors
    • Print PDF Design
    • Property, Agent, Blog Lists Design Settings
    • Sidebar Widget Design
    • Font management
    • How to add custom CSS
    • Custom Property Card Unit – Beta version
    • Email Management
    • Import & Export theme options
    • reCaptcha settings
    • YELP API Integration
    • iHomefinder Optima Express IDX
    • MEMBERSHIP & PAYMENT Settings
    • Property Submission Page
    • PayPal Setup
    • Stripe Setup
    • Wire Transfer Payment Method
  • Translation
  • FAQ
  • Pages
  • Header
  • Footer
  • Google or Open Street Maps
  • Payment Options
  • Plugins
    • Included Plugins
    • Third Party Plugins – IDX Compatibility
    • Third Party Plugins – Multi Languages
    • Third party Plugins – Other
  • Technical
    • Technical how to | Custom Code Required
    • Technical: Child Theme

Join Us On

Powered by WP Estate - All Rights Reserved
  • WpEstate
  • How to Build Your Website
  • Video Tutorials
  • Client Support
  • API