How to restrict uploading image based on its file size and image resolution in the custom image library using the "Validation Settings" feature available OOB.
Resolution restricts with =AND([Picture Height]>50,[Picture Width]>50) but not working.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
file size is not a supported field in the
Note: The maximum file size you can upload to a SharePoint Online site is 15 GB per file. unfortunately, you can't modify this limit as we can do in SharePoint On-Prem because it's a shared setting for all the tenants. also, there are no OOTB settings to adjust the file size limit per document library.
Create a remote event receiver on item Adding to check the file size before upload.
Second, The Picture Height & Width are supported in the
BUT, you should be aware of the validation doesn't fire on item upload, it's fired on item save / check-in.
So your formula
=AND([Picture Height]>50,[Picture Width]>50) should work but not as expected, where the file should be first uploaded, then the validation will be executed when you hit SAVE or CHECK-IN button as shown below:
I think this should be also helpful because you will not be able to save or check-in your files until matching the correct dimensions. in this case, you will be forced to upload a file again to match the validation settings.