Form #after_build is not working for PHP 7x
There are only 2 args to an after build method, the element and the form state.

Just remove the extra one and it’ll work:

function change_pic($element, &amp;$form_state)