ImageMagick is a great tool which helps create, edit, compose, or convert bitmap images. If you use ImageMagick to resize images on your app server, then it’s good to have it configured to combat pixel flood attack.
I recently came across this issue for a service I help maintain and here are the steps I took to fix the issue.
Navigate to /etc/ImageMagick folder and find the policy.xml. It’s usually write protected.
Edit the file and add these lines.
I have set it to 500 MB, but you should set it a limit based on your server and app requirement.
Megapixel calculator | toolstud.io should help convert Mega Pixel to width and height you want to support.
These three policy additions to policy.xml helped stop the flood attack for now.