Re: Restrict the size of images uploaded to the workplace
Andreas Zahner via opencms-dev <[email protected]> Wed, 2 Apr 2025 10:57:25 +0200
| Newsgroups | gmane.comp.cms.opencms.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Maria, it is not possible to restrict the upload file size per type, but you can restrict the image dimensions for the upload as an alternative. This can be done by adding some parameters to the image loader element in the opencms-vfs.xml configuration file: <loader class="org.opencms.loader.CmsImageLoader"> <param name="image.scaling.enabled">true</param> <param name="image.scaling.maxsize">4000</param> <param name="image.scaling.maxblursize">9000000</param> <param name="image.scaling.downscale">w:1600,h:1200,q:97,c:transparent</param> </loader> In the parameter "image.scaling.downscale" you can configure the image target dimensions after the upload, in this case 1600 x 1200 pixels using a quality of 97%. Kind regards, Andreas. ------------------- Andreas Zahner Alkacon Software - TheOpenCms Experts http://www.alkacon.com -http://www.opencms.orgAm 28.03.25 um 11:50 schrieb Malu via opencms-dev: > Hello everyone, > > I need to restrict the upload of images larger than 5MB to the > workplace. I've seen that you can restrict the size of files uploaded > to the workplace in the opencms-workspace.xml node: > <maxfileuploadsize>-1</maxfileuploadsize> > I've also seen that you can restrict the type of files uploaded, but I > don't know if you can restrict file sizes by type. > > Thank you for any hints! > Best regards. > Maria > > _______________________________________________ > This mail is sent to you from the opencms-dev mailing list > To change your list options, or to unsubscribe from the list, please visit > https://lists.opencms.org/mailman/listinfo/opencms-dev > > > _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit https://lists.opencms.org/mailman/listinfo/opencms-dev