WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code Required / Technical – How to Change the Minimum Image Dimensions for Property Uploads in WPResidence

Technical – How to Change the Minimum Image Dimensions for Property Uploads in WPResidence

357 views 0

By default, WPResidence requires property images to have a minimum width and height of 500px. If you wish to change this requirement, follow the steps below:

1. Modify the Minimum Dimensions in the Code

  1. Go to the file: themes\wpresidence\libs\ajax_upload.php

  2. Locate the following code:

if( !function_exists('fileupload_process') ):
function fileupload_process($file){
// Validate image dimensions (except for PDFs)
if( $file['type']!='application/pdf' ){
if( intval($file['height'])<500 || intval($file['width'])<500 ){ $response = array('success' => false,'image'=>true);
print json_encode($response);
exit;
}
}
}
endif;

Change the values 500 to your desired minimum width and height.

For example, to set a minimum size of 800×600, update the code as follows:

if( intval($file['height'])<600 || intval($file['width'])<800 ){

Update the Validation Message Displayed to Users

The text that informs users about the minimum image dimensions can be edited in two ways:

By editing the template file directly:
Go to: themes\wpresidence\templates\submit_templates\property_images.php

Using Loco Translate (Recommended):
If you are using translations, you can easily update the message via the Loco Translate plugin. Help https://help.wpresidence.net/article/how-to-rename-theme-words-with-loco-translate/

Technical how to | Custom Code Required

Related Articles

  • Technical: Change the Schedule Tour Email Text and the Form Default Message
  • Property list filter customization
  • Introduction to WPResidence Header Customization
  • Understanding WPResidence Header Types: An Overview

Help Categories

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

Join Us On

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