I am using CF 2016 and found that CFIMAGE does not work with the image type webp
Does anybody know if newer versions of CF support it?
I tried this forum's "Search this community" feature as I had posted a solution in the past, but apparently "this community" includes every post in other Photoshop-related groups. (This broadness of results makes the search feature useless.)
I don't believe newer versions support it as that would have been a big feature announcement.
The solution that I use when using CF2016-2023 is to convert WEBP to JPG using third-party ImageMagick.
Thanks for the input. The challange I have is that I'd want to retain the webp file as-is. I need to upload it through the dashboard, read and store it's attributes and then make it available for download. So I can't convert it.
ACS, can you clarify what cfimage actions you'd want to do? I'm only asking in case there may be an alternative to offer some (if not all) actions.
Finally, I was going to suggest you file an enhancement request at tracker.adobe.com, but I thought to check and indeed someone already had. It's at CF-4212258, and though it has no additional votes so far (since 2021), it is marked "to fix", so you never know when one more vote could catch the attention of those responsible. 🙂
As the saying goes, it's better to light one candle than to curse the darkness. Well, that's how I roll at least. 🙂
Thanks Charlie. I've added a vote for what it's worth, if it's not in since 2021 I'm not holding out much hope. Webp is common now and I've tested it and found that it does bring very significant improvements of file size over other file types such as jpg and even PNG.
For now it looks like we'll have to just not allow wepb in, as it's too much of a pain to manually manage it
Btw I'm using CFIMAGE to initially find out what type of file was uploaded (it crashes with webp's), video, audio or image. I then record several attributes from the file into the database, extension, height, width and filesize. I need the dimensions to manage the front end display as I only force reduction if it's over a certain width. I could manually type it in to each webp but what a pain that is, when it's automatic on all other formats. I could use CFFILE for some of this, find the extension and then avoid using CFIMAGE and ask for the dimensions. So there's a work around but it's for me.
We allow WebP & HEIC/HEIF image uploads, but we are currently converting them to JPG or PNG using ImageMagick (open source). We used CFImage for retrieving the image data, but discovered that GraphicsMagick (open source) did a better job (faster; doesn't crash; works with more image types; can bulk output data for an entire directory, etc.)
After discovering Caravaggio (a node.js image proxy), we don't use ColdFusion to resize images anymore. We prefer to retain the original uploaded image (convert only if WebP/HEIC/HEIF) and then use Caravaggio to resize, crop, overlay, rotate, flip and blur images by adding directives to the URL path. (Caravaggio has an option to modify the output format, so we add "o:wep" to the URL path for page requests when CGI.HTTP_ACCEPT contains "image/webp" and optimizes images are automatically returned as WebP.)
To reduce conversion overhead, we leverage BunnyCDN's perma-cache to permanently cache images. To assist with cache busting (whenever images are updated by clients), we add a unique date-based hash to the URL path so that updated images have a unique path and can be refreshed.
While the approach we've taken is technical and requires using some self-hosted non-ColdFusion apps & services (ImageMagick, GraphicsMagicl, reverse proxy, Caravaggio) and third-party (BunnyCDN), the result has been extremely good. We no longer have to generate & store multiple variations of images, WebP is returned automatically (if supported) and the Bunny CDN performance has boosted our SEO scores.
James, here's that post:
And if it may help you or other readers, here's how I found it--using google to get around that poor search experience here (and in many sites):
site:community.adobe.com inurl:t5/coldfusion-discussions/ "webp"
And to ACS, I'll confirm there are no other useful discussions here or in Google's results for all sites on the topic of cf support webp. But I'll offer some other thoughts in a reply to his comment instead of here.
@James Moberg , thanks for the heads-up on BunnyCDN. There are so many CDNs to evaluate, it seems like they're reproducing like, well ...
@Charlie Arehart , thanks for sharing your Google search operators. This should make search a lot easier for forum users. It's a shame that search has come to this, though. Terrible design.
Dave Watts, Eidolon LLC
I'm just going to have to avoid/block webp for now. I was really hoping the latest version of CF would have been brought up to do with image handling