Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gif Allowed memory size exhausted #1305

Closed
mpn7 opened this issue Feb 29, 2024 · 2 comments
Closed

Gif Allowed memory size exhausted #1305

mpn7 opened this issue Feb 29, 2024 · 2 comments

Comments

@mpn7
Copy link

mpn7 commented Feb 29, 2024

I'm using your package to upload and edit images the user submits to the server, when the user submits a GIF file it gives the error Allowed memory size of 134217728 bytes exhausted I changed the memory limit to 256MB and it still throws this error. The GIF file has 6MB.
I'm upgrading from the version 2, while it didn't keep the animation it also didn't throw this error.

The error happens in this line. The driver is GD

$manager = new ImageManager(new Driver());
$resized_image = $manager->read($image->getRealPath());
  • PHP Version:8.2
  • OS: MacOS
  • Intervention Image Version: 3.4
  • GD or Imagick: GD
@olivervogel
Copy link
Member

olivervogel commented Feb 29, 2024

Unfortunately, the GD Library is not really easy on the resources. This is especially true for animated GIFs, as animation is not natively supported and therefore has to be decoded frame by frame into a GDImage instance by this library.

Unfortunately, I have to advise you to increase the limit further or to switch to Imagick driver.

@olivervogel olivervogel changed the title Gif upload Allowed memory size exhausted Gif Allowed memory size exhausted Feb 29, 2024
@olivervogel
Copy link
Member

This topic gave me the following idea, which will be dealt with further in a separate issue (#1307).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants