Try our conversational search powered by Generative AI!

How to limit image size?


Is there a way I can warn or prevent authors from uploading an image that's too big?

say I want to max them at 500x500px images. How can I warn them or prevent them from uploading bigger images?

is there an eoiserver way? Or do I have to use an extension?

Dec 05, 2021 16:26

Something like this 

Or you could create a validation attribute or IValidate class 

Dec 06, 2021 8:49

Good alternative is to let them upload it in any size and then scale it automagicallly using either Image processor or image resizer plugin. Add disc cache / CDN to images and you are good to go!

Dec 09, 2021 14:31

I would advocate the route of using Image Processor or Image Resizer as well.  This would allow you to upload a single instance of the image and to reuse it in many different sizes which are appropriate to the view port and position within the site.

e.g. Uploading a 1920x1080 image and rendering the url as '' would result in the client receiving a resized version of the image at 500x500.  Cloudflare can be configured to cache images based on unique URL and Querystring combinations so that each size varient is sized once only for the supplied cache duration.

Dec 12, 2021 0:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.