-// delivering node-dependant images requires larger memory limit
-// trial and error, based on the current sizes
-// generic-ISO 43980800
-// generic-usb 44720128
-// 256M OK
-// 128M OK
-// 96M OK
-// 88M KO
-// 80M KO
-// 64M KO
-// Bottom line is, looks like we need in the order of twice the file size
-// so let's play it safe
-// Thierry - for 4.2, we need a larger area, was 100 for 4.1
-ini_set("memory_limit","150M");
+ini_set("memory_limit","512M");
+
+// disables mod_deflate compression when downloading the images
+// because apache reports a different size for the file when compressed
+// the transfer can be interrupted.
+apache_setenv('no-gzip', 1);
+ini_set('zlib.output_compression', 0);