I'm new to Bitbucket and never wrote hooks before. There was a problem when you commit images like png, which can be very large for their resolution. I need to write a Pre-Receive server hook to check the resolution of the image. After that I want to impose a restriction, for example:
100x100 - the max size is 0.5 Mb
1000x1000 - the max size is 3 MB
Advise what is best to use for a Bitbucket server for this.