Extracting Images from a Word 2007 Document

If your office is anything like mine, you get a lot of Web site content sent to you inside of Word documents. Most of the time, that’s the best way of doing things, since formatting within e-mail is so inconsistent and unreliable. The main problem with using Word documents to send new Web site content is the inclusion of images. A lot of people will embed the images directly in a Word document without attaching the originals to the e-mail message.

Normally, it can be extremely difficult to actually extract images from Word documents. Microsoft did not include any reliable tools to save the images out of the document. Once they’re in there, there’s no simple way to get the original images out.

Optimize Your JPEGs with PHP

If you’re anything like me, you put a lot of images and photographs on your Web site without opening them in PhotoShop to optimize them for the Web, first. Generally, if I download an image from the Web or I get an image e-mailed to me to add to the Web site, as long as it’s the right size, I just upload it and move on.

Unfortunately, however, those images are usually quite bloated and not compressed properly for the Web. With PHP, though, you can easily optimize an entire directory full of JPEG and PNG images with one simple script without losing any noticeable quality.