On-demand image manipulation for PHP 5.3+