With the Directory Theme, I notice a listing owner can upload any size image they like into their listing. Is there any way to constrain or limit the size of the images they upload at into their listing?
im afraid not
I currently use this plugin found on wordpress.org It works great and does exactly what you are looking for. I currently use it on my site. I was having the same issues with users upload 5mb images for their listing which in return would slow the site down when loading the images. (not anymore, thanks to this plugin.) BTW it’s free!!
Resize Image After Upload
Super easy to configure.
Hope this helps!
Thanks very much Bernard. Awesome!
@Wayne … I use these two together in a 2-step process:
1- https://wordpress.org/plugins/wp-image-size-limit/ … to set the upload limit to whatever you want to. I have mine set to 2Mb max and once uploaded the below plugin crunches the image down and delete the original 2Mb image automatically …
2- https://wordpress.org/plugins/ewww-image-optimizer/ … to crunch 2Mb images down to about 100Kb without any loss of quality for directory use. (If the user uploads a 500Kb image it gets crunched down to 40-50Kb)
Thanks Henk. Brilliant! 🙂
thanks for sharing
Just an update … ewww-image-optimizer has stopped working properly for me. Must be the latest version updates. Now using https://wordpress.org/plugins/imsanity/
Thank you Bernard and Henk. Very useful info. Thanks for posting this Wayne, I was just about to ask the same question.
Thanks Henk 🙂
I added this to the solutions db 😉
@ Henk. I just tried to use the WP Image Size Limit and found that the listing was still created but the larger image was not saved (I had one under 300K and one over). The issue was that the screen did not change to a ‘We have received your listing’ style but remained as a ‘create listing’ screen.
Is there any way to actually STOP the listing being saved and give the user a chance to replace the over-sized image with a smaller one? A suitable message can be added e.g. images over 300 KB are not accepted. Please resize these and try again.
Hope that is clear enough.
A suitable message can be added e.g. images over 300 KB are not accepted. Please resize these and try again.
It does exactly that … it gives an error when you save/submit a new listing with an “over-sized” image (and returns the unsubmitted form back to you to correct). That’s what mine does anyway. The “error message” is not very clear and you may be “missing” it.
Start your new website today!