Search code examples
coldfusionwebp

How to convert images like JPEG, PNG, etc. to WebP with ColdFusion while maintaining the metadata?


I'm looking for an effective method for automating the conversion of a number of images to the WebP image format. I'm particularly interested in a method that will keep the metadata or allow me to add or edit the metadata.


Solution

  • The easiest way would be <cfexecute> with cwebp https://developers.google.com/speed/webp/docs/precompiled

    As for metadata...

    WebP format do support EXIF/XMP metadata. The next version of WebP library (libwebp) will have appropriate APIs supporting handling of EXIF/XMP metadata, along with supporting utility binaries to convert JPEG/PNG to WebP format retaining the metadata from original files.

    Quoted from WebP Google Group. Meanwhile, follow issue 52 for latest updates? https://code.google.com/p/webp/issues/detail?id=52