I am working on optimizing site load speed for a few moderately high traffic sites. Some quick observations show that creating 40 picture thumbnails (e.g. 138x138 JPG @75% quality) results in 700 Kb total size with embedded metadata and 258 Kb with stripped met开发者_StackOverflow中文版adata. Which means that roughly 60% of image size is metadata.
So what would be pros and cons of removing metadata from thumbnails? Are there any regulations, e.g. you must keep author info / copyright info in the images?
Any insights would be appreciated.
There are no copyright regulations, in most countries, which require you to include copyright information in the metadata; the Berne Convention (an agreement that many countries, including the US, adhere to) says that copyright must apply to any work, from the moment of creation, without registration or notice being necessary. Most, if not all, of your users will never look at the metadata. There's pretty much no point in preserving it in thumbnails; just strip it off, and improve performance for your users, which they do care about.
You should do an analysis of the metadata to find out what's taking all that space - it seems excessive. Perhaps some of it is an embedded thumbnail, which would be redundant.
Probably most of the metadata is colorspce representation (for different media, printing etc). I have striped this in one of my commercial web sites and it really saves at least 70% of original size. If you do not intent to color process images you can safely strip this metadata. Copyright metadata is not that much in size and you can keep it.
The only issue I could think of is whether any license agreement you might have with a particular image source requires that you leave metadata in the image. But if there is none, then sure, get it out of the image.
Of course, this doesn't absolve you from respecting image copyright, but I'm assuming you know that.
精彩评论