Redirect to default page if referer isn't set

Instead of displaying `You should be redirected to <a href=""></a>`
Merge pull request #392 from jgen/develop

Resizing images actually was broken, how nobody noticed I don't know.
pass already fetched image object into resize(), rather than passing the ID to be re-fetched
Merge pull request #389 from HungryFeline/patch-1

Redirect to default page if referer isn't set
Merge pull request #393 from shish/resize_tweak

pass already fetched image object into resize()