How to add image extension .webp on editor when creating a new web content in Documents & Media

Issue

  • Can't add image extension .webp on editor when creating a new web content

Environment

  • DXP 7.0 or higher

Resolution

In order to upload and work with .webp extensions in Documents and Media, follow these steps:

  • Install and enable ImageMagick and Ghostscript
    • If you are running a Liferay Docker DXP image, ImageMagick and Ghostscript are already installed and enabled.
  • Go to System Settings > Documents and Media > Item Selector View and add .webp as valid extension, these setting allows you to select and upload this types of images
    mceclip1.png
    mceclip0.png

  • In portal-ext.properties add the following property dl.file.entry.preview.image.mime.types, you need these in order for these images types to appear in the preview dialogue, so you can select them again after being uploaded:

    dl.file.entry.preview.image.mime.types=\
            image/bmp,\
            image/gif,\
            image/jpeg,\
            image/pjpeg,\
            image/png,\
            image/tiff,\
            image/x-citrix-jpeg,\
            image/x-citrix-png,\
            image/x-ms-bmp,\
            image/x-png,\
            image/x-tiff,\
            image/webp

    mceclip2.png

  • Go to System Settings > Adaptive Media > Images and add as Suported MIME Types image/webp so Adaptive Media sees them as valid types to be processed and work with (this is not needed in DXP 7.0 as Adaptive Media still doesn't exist)

Additional Information

¿Fue útil este artículo?
Usuarios a los que les pareció útil: 2 de 2