compressed img upload and some fixes