Copy link to clipboard
Copied
I'm wondering if there is a way to convert webp to jpg on upload using CF?
I've encountered issues where Adobe ColdFusion wasn't able to read JPG photos from our clients that were created using an iPhone 4. As a result, we started using CFExecute with GraphicsMagick for all of our image transformations. (GM is also used by Etsy & Flickr.) I've tested ImageMagick it also works. (We also have IM installed so we can convert HEIF/HEIC images to JPG automatically upon upload.)
I used this WEBP image for testing:
https://www.gstatic.com/webp/gallery/1.webp
Original Filesize:
...Copy link to clipboard
Copied
I've encountered issues where Adobe ColdFusion wasn't able to read JPG photos from our clients that were created using an iPhone 4. As a result, we started using CFExecute with GraphicsMagick for all of our image transformations. (GM is also used by Etsy & Flickr.) I've tested ImageMagick it also works. (We also have IM installed so we can convert HEIF/HEIC images to JPG automatically upon upload.)
I used this WEBP image for testing:
https://www.gstatic.com/webp/gallery/1.webp
Original Filesize: 10,474
GraphicsMagick:
gm convert c:\test.webp c:\test.jpg
Resultant Filesize: 12,338
ImageMagic
magick c:\test.webp c:\test.jpg
Resultant Filesize: 25,132
Copy link to clipboard
Copied
This is great. Thank you. Would you be willing to share a code sample? My knowledge is a bit limited.
Copy link to clipboard
Copied
I provided simple command line examples to convert WEBP to JPG using both GraphicsMagick and ImageMagick. Install either. After a file with the "webp" extension is uploaded, perform the conversion using the CFExecute tag.
If you need help regarding how to use CFExecute, documentation is available here:
https://cfdocs.org/cfexecute
If you are unable to install ImageMagick or GraphicsMagick on your server, you may want to consider using a third-party API. Here are some that I found while searching for "WEBP to JPG API'.
Copy link to clipboard
Copied
Thank you again!
Copy link to clipboard
Copied
At the time I posted this question, I was on a shared server and not able to install apps. I am now in the process of migrating to a private server where I have more control. I have installed both ImageMagick and GraphicsMagick on my server. With regard to converting files, both of these options work great. Very easy to setup and use. These worked out to be excellent solutions for me.
Copy link to clipboard
Copied
If you're looking to convert your WebP images to JPG format, one option you can try is the online converter tool available at Webp To Jpg Converter. This tool allows you to quickly and easily convert your WebP files to JPG format without having to download any additional software.
To use the tool, simply upload your WebP file to the website, select "JPG" as the output format, and then click the "Start Conversion" button. The tool will then convert your file and provide you with a download link for the resulting JPG image.
Alternatively, if you're looking for a more robust image editing solution, you can consider using Adobe Photoshop or Adobe Lightroom to convert your WebP images to JPG format. Both of these programs offer advanced image editing capabilities, including the ability to convert images to different formats, adjust color and brightness, and more.
I hope this helps! Let me know if you have any other questions.
Copy link to clipboard
Copied
Please re-read the original poster's question... "using CF". Your response requires manual effort and doesn't involve CF at all.
Copy link to clipboard
Copied
hi can you remove my last answer, because users can't edit or delete the post.