You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Janko Marohnić edited this page Mar 27, 2018
·
4 revisions
When processing images that were uploaded by users, it can be useful to limit the amount of resources your imaging library is allowed to use for processing. This can also help prevent certain vectors of attack.
MiniMagick
Resource limits for ImageMagick can be set either via environment variables or the -limit command-line option. For the latter you can use ImageProcessing::MiniMagick#limits:
Vips.vips_cache_set_max500# up to 500 last operationsVips.vips_cache_set_max_mem100*1024*1024# up to 100MB of dataVips.vips_cache_set_max_files500# up to 500 tracked files