Blog¿Cómo trabajar con imágenes WebP en Liferay?
¿Cómo trabajar con imágenes WebP en Liferay?
Liferay

¿Cómo trabajar con imágenes WebP en Liferay?

Miguel Ángel Júlvez

Miguel Ángel Júlvez

Consultor Liferay

19 junio 2025
7 min lectura
Compartir:

What is the WebP format?

WebP is an image format developed by Google in 2010 with the goal of reducing image size without losing quality. WebP supports both lossy and lossless compression, as well as alpha channel (transparency) and animations.

Among its main advantages over other formats are:

  • Smaller file sizes: reduces between 25% and 34% compared to JPEG or PNG.
  • Transparency support: like PNG, but more efficient.
  • Better loading performance: improves Web Performance Optimization (WPO).
  • Lower bandwidth usage: especially useful for mobile users.

Browser support

Currently, more than 95% of modern browsers (Chrome, Firefox, Safari, Edge, Opera) support WebP in both static and animated versions. This makes its widespread use safe for almost any web context.

WebP Support

Configure Liferay to support WebP images

Below, we guide you through the Liferay configuration so you can upload, manipulate and display images in WebP format within the portal environment.

ImageMagick installation

Liferay relies on external libraries for image manipulation. In this case, it is necessary to have ImageMagick installed, a powerful software for image conversion and editing from the command line.

Configure WebP support in the media library

For Liferay to recognize WebP format as valid, you must edit the configuration file of allowed MIME types. This can be done by modifying the portal-ext.properties file with the following property

dl.file.entry.preview.image.mime.types=\
  image/bmp,\
  image/gif,\
  image/jpeg,\
  image/png,\
  image/tiff,\
  image/webp

Configure WebP support in the image selector

Liferay's image selector filters files by type, and it is necessary to enable WebP manually.

You must go to Control Panel -> System Settings -> Documents and Media -> Image Selector View and add '.webp' at the end

Example configuration for Liferay image selector with WebP

Configure WebP support in Adaptive Media

If you are using Adaptive Media in Liferay to manage responsive image versions, it is also possible to enable WebP.

You must go to Control Panel -> Adaptive Media -> Images and add 'image/webp' at the end

Example configuration to use adaptive media with WebP

And that's it. From now on you can use images in webp format like any other image type and you will be able to improve the WPO of your pages.

Etiquetas:LiferayWebPOptimizaciónImágenesPerformance
Siguiente

Mejorando las búsquedas de Liferay con sinónimos

¿Listo para llevar tu proyecto al siguiente nivel?

En JULDITEC transformamos ideas en soluciones digitales innovadoras. Trabajemos juntos.