@MiriamI was never testing taking picture from camera directly, I do not think that was ever meant
That error is in 99.99% of cases caused by hosting (low performance, limits, usage of GD library instead ImageMagick, incorrect configuration etc...)