fix gif + jpeg

http://modx.im/blog/dmi3yy/1140.html#comment10407