Added support for restrictions on image dimensions. Added auto-generated HTML5 rules