Enabling Optimization of Animated GIFs
To scale animated GIFs, Adaptive Media uses an external tool called Gifsicle.
If Gifsicle isn’t installed and image/gif is included as a supported MIME type, Adaptive Media scales only one frame of the GIF, making a static GIF.
Optimizing animated GIFs using Adaptive Media requires three steps: installing Gifsicle on your local server where DXP is running, setting the PATH environment variable, and then enabling Gifsicle in DXP’s System Settings.
-
Install Gifsicle and add it to the server’s PATH environment variable.
NoteAs of Liferay DXP 2025.Q2.9, Gifsicle is no longer preinstalled in Liferay Docker images. To install it manually,
- Run the container as the root user:
docker exec -u root -it <container_name_or_id> bash- Inside the container, install Gifsicle:
apt-get update && apt-get install -y gifsicleAfter installation, ensure the container’s PATH environment variable includes the path to
gifsicle. -
Configure Adaptive Media:
-
Navigate to the Global Menu, select the Control Panel tab, and click System Settings → Adaptive Media.

-
Under Images, check Gifsicle Enabled.

-
-
Additional Steps:
-
If ImageMagick is set to handle
image/gif, GIFs may not display correctly. To prevent conflicts, select ImageMagick in the left menu and click Remove Setting (
) next to image/gifunder Supported MIME Types to ensure Gifsicle handles optimization.
-
If Adaptive Media is disabled, previews and thumbnails are not displayed in Documents and Media. Ensure at least one Adaptive Media setting is enabled.

-
-
Click Save when finished.