Development Blog With Code Updates : Developercast.com

July 29, 2008

Kae Verens’ Blog: pre-parsing HTML for incorrectly-sized images

Filed under: Development — @ 1:03 pm

Kae Verens has a recent blog post that looks at a method for helping to protect users from themselves when working with images – a method for handling ones incorrectly sized.

Every now and then, I get a call from a client who is puzzled why their site is running slow. I would look at their page and see an innocuous image inserted into a paragraph. When I examine the image, though, I see that the client has artificially resized the image using HTML. One recent example showed on-screen as a 300px-wide image. When I examined it, it was actually 3000px wide (approx).

The script looks through some HTML markup and, based on the sizes in the image tags, resizes the images appropriately. An example and the source are provided.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress