Legacy Knowledge Base
Published Sep. 10, 2025

Adaptive Media Processing of GIFs Leads to High Disk Usage in Temp Folder

Written By

Daniel Carrillo Broeder

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • When using Adaptive Media, the tomcat/temp directory grows significantly, consuming a large amount of disk space. 
  • The following error can be seen repeatedly in the logs:

    Unable to scale file entry <ID> to match adaptive media configuration <NAME>

Environment

  • Liferay DXP 7.4 and Quarterly Releases.
  • Adaptive Media and ImageMagick is enabled.

Resolution

  • This issue occurs when Adaptive Media is configured to use ImageMagick for processing images, and there are GIF files in the Document and Media library.
  • Each time a GIF is accessed, ImageMagick attempts to process it but fails, leaving behind temporary files (frames of the GIF) in the temp directory which are not automatically cleaned up.

Solution 1: Enable Gifsicle for Optimized GIF Previews

This is the recommended approach if animated GIF previews are desired.

  1. Install the Gifsicle tool on the server where Liferay is running.
  2. Enable Gifsicle in Liferay by navigating to Control Panel → Configuration → System Settings → Adaptive Media → Images.
  3. Check the Gifsicle Enabled box and save.

Solution 2: Disable ImageMagick for GIFs

This workaround will stop the errors and prevent the temp folder from filling up, but it will result in static previews for GIFs instead of animated ones.

  1. Navigate to Control Panel → Configuration → System Settings → Adaptive Media → ImageMagick
  2. In the Supported MIME Types field, remove the image/gif entry.
  3. Click Update to save the changes.

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base