API: Prevent large images from repeatedly crashing PHP on resize
Merge pull request #2859 from kinglozzer/gd-resize-crash-mast

API: Prevent large images from repeatedly crashing PHP on resize