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
-
Go to the file: themes\wpresidence\libs\ajax_upload.php
- 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:
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/