Set minimum and maximium image file upload size

Hi!

Is there a way to set a minimum and a maximum for the upload size for listing images? A code for vendor/host images would be also great. I need a separate setting for listing images and a separate setting for vendor/host images.

Thank you

Hi,
Unfortunately, there’s no way to require specific dimensions for users, but you can limit the max upload file size How to Increase the Max Upload Size in WordPress and change the image cropping rules in Settings/Media section (by default listing images are resized to 800x600px).

Hi @yevhen there are some specific values in the size of the images that we should set up to make sure the site does not have any issues when uploading pictures and does not get slow?

Some of my users are already having issues uploading their images.

Thanks!

Please let me know if they get the “upload limit is reached” error or if there’s another issue like slow uploading, etc. If it’s the upload limit error you can try the solution suggested above. The image sizes in Settings/Media are already optimized for the theme, these shouldn’t affect uploading.

Is there a code to only allow image uploads for Listing images that are larger than 800px in width?

Unfortunately, there’s no easy way to do this because at the time of uploading there are no file details that can be used to detect the current form or page (in the available WordPress filters/actions). I highly recommend adjusting the image size so WordPress will resize and crop it automatically, the original uploaded image will not be used nor displayed anyway. You can limit the upload size globally to avoid storing files that are too big, allowing only regular photos/images. Also, if you want to save space you can offload media to some CDN like Amazon S3 and don’t store it locally WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage – WordPress plugin | WordPress.org

With the WP Offload Media Lite plugin, can we use it to offload media with the Free version?
I am on the free version of WP Offload Media Lite but the files are unable to offload

Unfortunately I can’t say for sure because I haven’t tested this plugin locally, but it seems to be a popular one for offloading media. You can also try using any other CDN plugin, for example the LiteSpeed Cache plugin has a CDN solution built-in.