Skip Navigation

[Resolved] Automatically resizing and compressing user uploaded images

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 9 months, 3 weeks ago.

Assisted by: Waqar.

Author
Posts
#2693074

We are finding that we are very quickly running out of web hosting disk space 100GB, and mostly because our users are uploading high resolution images. Is there a way Toolset they wouldn't images uploaded again not only auto resize the the width of the image with auto-height dimensions but can also compress the the file size from 300dpi to being 72dpi?

Since your product is one that allows for user contribution and interaction, I am surely convinced that others have come across the same issue before. Thoughts?

Thank you

#2693158

Hi,

Thank you for contacting us and I'd be happy to assist.

While Toolset Forms don't include any feature to limit the uploaded file's quality or DPI, you can use the 'cred_form_validate' hook to limit file uploads, based on the file size:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

Here are some forum threads with the code examples:
https://toolset.com/forums/topic/how-to-set-upload-file-size-and-file-type-limit/
https://toolset.com/forums/topic/file-upload-validation/

I hope this helps and please let me know if you need further assistance.

regards,
Waqar