Sets $image_sized and checks whether it’s empty in addition to
checking for WP_Error. Fixes a notice on the user pages if a user
has managed to upload an invalid image.
Right now it will fallback to the full size, but if the full image is
invalid anyways, it will still show a broken image but won’t
throw a notice. It could be changed to fallback
to the default avatar instead.
Sets $image_sized and checks whether it’s empty in addition to checking for WP_Error. Fixes a notice on the user pages if a user has managed to upload an invalid image.
Right now it will fallback to the full size, but if the full image is invalid anyways, it will still show a broken image but won’t throw a notice. It could be changed to fallback to the default avatar instead.