Re: Opencms webp image format
"Schliemann, Kai via opencms-dev" <[email protected]> Wed, 20 Sep 2023 15:19:51 +0000
| Newsgroups | gmane.comp.cms.opencms.devel |
|---|---|
| Message-ID | <AS8PR08MB98374E720D3E918E40EFCE4DFCF9A@AS8PR08MB9837.eurprd08.prod.outlook.com> |
Hi Kai, thanks, that sounds great. I gave your comment on GitHub a Thumbs up. Maybe it makes it into the upcoming release. Best regards Kai Von: opencms-dev <[email protected]> Im Auftrag von Kai Widmann via opencms-dev Gesendet: Mittwoch, 20. September 2023 17:11 An: Giuseppe Lonis <[email protected]> Cc: Kai Widmann <[email protected]>; The OpenCms mailing list <[email protected]> Betreff: Re: [opencms-dev] Opencms webp image format Hey Giuseppe (an to everyone who is interested in WebP with OpenCms), Therefore the problem cannot be solved. I beg to differ, I solved this with the library "webp-imageio" described here: https://genuinecoder.com/java-webp-image-read-save-tutorial/ webp-imageio adds native support for WebP to Java, so the native image methods used in OpenCms image scaling also work with WebP. It’s really as simple as dropping the jar in the lib folder (or defining a Maven/Gradle dependency). My first tests are really promising, image sizes in the CMS are now correct (instead of -1 x -1), image scaling of WebP images is working as expected. So far so good. It’s important to know that you have to re-upload WebP images, I guess the size is read during the initial upload, once wrong it doesn’t get corrected by using the library. But after re-uploading the image, everything seems to be fine. If I for some reason find that this does not work as expected in the end, I’ll report. @Alkacon: it might be a good idea to add this as a dependency for the OpenCms core, that way WebP should work as expected. Cheers Kai _______________________________________________ Kai Widmann mediaworx berlin AG +49 30 27580-262 Digitale Visitenkarte: https://mediaworx.com/021 www.mediaworx.com<http://www.mediaworx.com> Am 20.09.2023 um 08:59 schrieb Giuseppe Lonis <[email protected]<mailto:[email protected]>>: Hi Kai, unfortunately on the opencms issues they wrote that the ImageScaler library does not support that format. Therefore the problem cannot be solved. Greetings Giuseppe Il giorno mar 19 set 2023 alle ore 18:13 Kai Widmann <[email protected]<mailto:[email protected]>> ha scritto: Hello Giuseppe, I’m facing similar problems in OpenCms 15. May I ask if you solved this and if so, how? Cheers Kai _______________________________________________ Kai Widmann mediaworx berlin AG +49 30 27580-262 Digitale Visitenkarte: https://mediaworx.com/021 www.mediaworx.com<http://www.mediaworx.com/> Am 15.08.2023 um 10:55 schrieb Giuseppe Lonis via opencms-dev <[email protected]<mailto:[email protected]>>: HI, on opencms version 14 there are problems displaying images in webp format. In particular, in the preview inside content the image is not resized, unlike the jpg ones. Also the scaling of the image with the command image.webp?__scale=w:1200,h:1200,t:2,c:transparent,p:0 does not work (it should become a square image instead it keeps the original format). Finally, due to this problem the image gallery is very slow to load. A thousand thanks Greetings Joseph _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit https://lists.opencms.org/mailman/listinfo/opencms-dev _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit https://lists.opencms.org/mailman/listinfo/opencms-dev