WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code / Technical how to : Change image size requirements for upload images in front end submission

Technical how to : Change image size requirements for upload images in front end submission

3649 views 0

Starting with WPResidence v.13 we introduced an image size check for images. We did that since many times users upload small images that get stretched or simply don’t look good. The scripts check if the image is at least 500px x 500px.

If you want to change the size we check (or simply disable it) you need to go into

wpresidence/libs/ajax_upload.php 

where you have

if( intval ( $file['base']) ==0){
if( intval($file['height']) false,'image'=>true);
echo json_encode($response);
exit;
}
}

Change the 500 value with the size you  want. If you want to disable the check just delete that code.

There is a text warning that can be changed from languages files – https://help.wpresidence.net/article/how-to-rename-theme-words-with-loco-translate/ or in code in file path \wpresidence\libs\css_js_include.php

'warning' => esc_html__('Image needs to be at least 500px height x 500px wide!','wpresidence')

 

 

Technical how to | Custom Code

Related Articles

  • How to Add Custom Fields to the Login, Register and Forgot Password Forms
  • 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
MLSImportWordPress IDX Plugin for MLS ListingsImport MLS listings into your WordPress website, customize your property pages, and keep your inventory updated.Start free 30-day trial →

Help Categories

  • 111 Installation & Changelog
  • 19Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 14Footer
  • 38Header
  • 3IDX & MLSImport
  • 23Maps & Location Settings
  • 50Multilingual Websites – WPEstate Translate (Included)
  • 21Pages & Page Templates
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 38Property Single Page
  • 33Search & Filtering
  • 170Technical how to | Custom Code
  • 9Technical: Actions and filters
  • 6Technical: Child Theme
  • 86Theme Options & Global Settings
  • 6Theme Translation & Localization
  • 28Third Party Plugins Compatible
  • 16WPBakery Shortcodes
  • 51WPResidence / WPEstate CRM
  • 9WPResidence Elementor Studio
  • 39WPResidence Elementor Widgets
  • 79WPResidence FAQ
  • 1WPResidence PRO

Join Us On

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