Experimental rewrite of image hosting script using Laravel