After migration - Profile pics are not shown and cannot upload new pics

I have migrated an Elgg installation to another server. In the new server, default profile pictures are shown instead of those set by users. Also when editing a profile to add a new picture, the following error is displayed "Resize of the avatar failed". Any help?