Limiting max size of images uploaded to Wordpress
Some customers don't like or remember to resize their images before uploading to #WordPress sites.
So we had to create a size limite enforcer plugin and afterwards use WPMuDev's Smush It to create palatable imagery.
Thanks to original code from Web Hosting Hero it was very fast to convert it to a standalone plugin and create a solution that works without messing our customers theme.
This was initially a Gist at https://gist.github.com/iPublicis/bc173884f27088c85b9ea3c619c7341f but after adding translations was moved to here.
Original article and code from Web Hosting Hero can be seen at https://www.webhostinghero.com/blog/how-to-limit-the-image-upload-size-in-wordpress/