# About profile picture

**URL:** <https://community.hivepress.io/t/about-profile-picture/683>\
**Category:** HivePress\
**Created:** [June 29, 2022, 1:56pm UTC](https://community.hivepress.io/t/about-profile-picture/683 "2022-06-29T13:56:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![keita192511890716](https://community.hivepress.io/user_avatar/community.hivepress.io/keita192511890716/32/356_2.png) [@keita192511890716](https://community.hivepress.io/u/keita192511890716)\
**Post date:** [June 29, 2022, 1:56pm UTC](https://community.hivepress.io/t/about-profile-picture/683/1 "2022-06-29T13:56:45Z")

</div>

I would like to require a profile picture instead of option (any).  
How can I do this?

 ![image](https://community.hivepress.io/uploads/default/original/1X/5eef41b1bd7042413959e8397fec45e20f06c02d.jpeg)

---

<div class="post-metadata">

**Author:** ![yevhen](https://community.hivepress.io/user_avatar/community.hivepress.io/yevhen/32/23_2.png) [@yevhen](https://community.hivepress.io/u/yevhen)\
**Post date:** [June 30, 2022, 10:10am UTC](https://community.hivepress.io/t/about-profile-picture/683/2 "2022-06-30T10:10:21Z")

</div>

Please try this PHP snippet [Make the profile image required for users #hivepress #users · GitHub](https://gist.github.com/hivepress/16fa87cfcae95e2927bea6d802d1a12d)

---

<div class="post-metadata">

**Author:** ![keita192511890716](https://community.hivepress.io/user_avatar/community.hivepress.io/keita192511890716/32/356_2.png) [@keita192511890716](https://community.hivepress.io/u/keita192511890716)\
**Post date:** [June 30, 2022, 1:50pm UTC](https://community.hivepress.io/t/about-profile-picture/683/3 "2022-06-30T13:50:32Z")

</div>

Thank you so much!

I can’t get rid of the optional (OPTION) text. How can I make it disappear?

This is a required field and I would like to make sure it does not appear as optional.

 ![image](https://community.hivepress.io/uploads/default/original/1X/7ec418914a8d5e8ca44c3462c33c1fb2f82bc883.jpeg)

---

<div class="post-metadata">

**Author:** ![yevhen](https://community.hivepress.io/user_avatar/community.hivepress.io/yevhen/32/23_2.png) [@yevhen](https://community.hivepress.io/u/yevhen)\
**Post date:** [June 30, 2022, 6:26pm UTC](https://community.hivepress.io/t/about-profile-picture/683/6 "2022-06-30T18:26:01Z")

</div>

Please try this PHP snippet

```auto
add_filter(
	'hivepress/v1/forms/user_update/errors',
	function( $errors, $form ) {
		$user = $form->get_model();

		if ( $user && ! $user->get_image__id() ) {
			$errors[] = 'Please upload the profile image.';
		}

		return $errors;
	},
	100,
	2
);

add_filter(
	'hivepress/v1/forms/user_update',
	function( $form ) {
		$form['fields']['image']['statuses']['optional'] = null;

		return $form;
	},
	1000
);

```

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [July 30, 2022, 6:26pm UTC](https://community.hivepress.io/t/about-profile-picture/683/7 "2022-07-30T18:26:41Z")

</div>

Closed on July 30, 2022, 6:26pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
