experiment with web
make it work
code for valid size support
support limiting valid sizes
fix content-length bug
try to fix quality only in webp encoding, not in resize
merge samarth's changes