For image component with xtype html5smartimage, I have tried the sizeLimit option of html5smartimage wih string value 1 assuming will not be able to upload image exceeding 1mb but was able to upload image of a greater size. I did not find any info on the value of sizeLimit except for the fact the default 0 means no limit to the image upload size. Please do share any info on sizeLimit option?
Alternatively, tried listener on image dialog on event loadimage. Is able to read image size using this.fileInfo.size Next is to call the clear action of the dialog, when the size exceeds limit. I am yet to figure out where is the out of box clear action of dialog implemented any insight on this would be of great help. crop, rotate are other actions that are available along with the clear action in the image dialog of the component.
Also what would be the best way of doing it or if anyone has solution or suggestions pls do share your information.
This is a known bug in extjs. A post exists to explain how to implement this limit for DAM asset UI at:
http://experience-aem.blogspot.co.uk/2014/12/aem-6-sp1-classic-ui-restrict-large-or-small-files-upload.html
You can probably leverage this to extend the smart image and extend the validation to check the file size.
HtH
PS: The logic is too long to fit in this answer box but the gist is around validation hooks. Try it from the article and see if it works for you.