web server loading image problem

Ok, here’s an optimized packet code alternative to the one in the original post. Please use it!

       byte tBuf[64];
       unsigned long lastPosition = 0;
       File myFile = SD.open(param_value);        // open file
       if (myFile) {     
            while(myFile.available())
                {
                   myFile.read(tBuf,64);
                   client.write(tBuf, myFile.position() - lastPosition);
                   lastPosition = myFile.position();
                }
            myFile.close();
        }

It works well loading html pages but still no luck on images, very annoying. You know what; it could be the browser. I’m on OS X. Will check on IE, windows. <— nope, same result
Here’s the metadata on the image from the browser. Everything looks fine except for the image size. It shouldn’t be blank. It should be ‘12 x 12’.

                   myFile.read(tBuf,64);

This function returns the number of bytes actually read. Don't throw that away.

                   client.write(tBuf, myFile.position() - lastPosition);

No. You want to write the number of bytes actually read.

PaulS:                   myFile.read(tBuf,64);

This function returns the number of bytes actually read. Don't throw that away.

                   client.write(tBuf, myFile.position() - lastPosition);

No. You want to write the number of bytes actually read.

Don't worry, it does what it's meant to.

Ok, I switched to an ethernet shield. I bought a cheap Chinese clone that turned out to be a dud. I was at RadioShack the other day and saw they sold a seedStudio ethernet shield so I grabbed that. It's a W5200 chip.

The images showed up like a charm with no code changes (except for server settings) and FAST too. It could be from the W5200 chip.

It seems like there is a bug with the WIFI library.