added compression, resizing for image thumbnails
Implemented simple thumbnail system for big speedup