Webserver from SD card and picture problem

As far as I can understand, the web server as it is, is rather minimal, yet enough for many simple applications.
For an application I am working on (on Mega and Ethernet shield) I preferred to develop something more systematic and complete. You can find it at An HTTP Server for Arduino Mega with file upload/download and AJAX capabilities - Networking, Protocols, and Devices - Arduino Forum, where I posted what I have done.
If you are working on UNO, it needs to be downsized a bit, anyway you may take it as a starting point.
HTH,
eca