Image resizing on the fly - with caching