<p>I solved the problem by adding the following (missing) step to the <strong>Performing the Upgrade</strong> section of the docs at <a href="https://docs.craftcms.com/v3/upgrade.html#performing-the-upgrade" rel="nofollow noreferrer">https://docs.craftcms.com/v3/upgrade.html#performing-the-upgrade</a>:</p>

<p>Copy your old <code>craft/storage/userphotos/</code> over to your new project's <code>storage/userphotos/</code></p>

CC BY-SA 4.0
2018-06-13T22:05:34.957Z
Docs have been updated at time of writing. See step 4 at https://docs.craftcms.com/v3/upgrade.html
Andrea DeMers
CC BY-SA 4.0
2018-06-13T20:19:30.887Z
2018-06-13T20:19:30.887Z
Andrea DeMers
<p>The migration should have taken care of that. The only scenario where it's not a bug I can imagine is if you ran the migration on a staging server that did not have the actual user photo files and then pushed the DB to live server. If that's not the case, can you get in touch via support@craftcms.com?</p>

CC BY-SA 4.0
2018-06-08T14:27:23.387Z
Thanks Andris for confirming expected behaviour. I performed the upgrade in my local Homestead/Vagrant dev environment. It was a little while ago, so it would have been on an early RC. I wonder if this has anything to do with the recent issue of assets with leading underscores in file names not being indexed? Fortunately, this is a test upgrade, so I may just try again on the most recent RC. I'll let you know.
Andrea DeMers
CC BY-SA 4.0
2018-06-11T23:52:15.137Z
I tried a fresh upgrade from Craft 2.6.3017 to Craft 3.0.10.3 via Composer and got the same result. I noticed the Craft 3 upgrade process creates a storage/userphotos folder. However it is empty. I assume this makes sense because it doesn't know where to get the User Photos from. Is there a step missing in the **Performing the Upgrade** section that goes something like: "Copy your old craft/storage/userphotos over to your new project's storage/userphotos?
Andrea DeMers
CC BY-SA 4.0
2020-11-02T19:44:23.610Z
Is there any way to run just the userphotos part of the upgrade? - it seems the permissions where not right on our upgrade and the user photos did not update.
Green17
CC BY-SA 4.0
2020-11-04T11:51:47.367Z
@Green17 that migration was pretty and not very reversible. The only way to re-do it would be to re-upgrade.
Andris Sevcenko
CC BY-SA 4.0
2020-11-04T12:56:44.937Z
@AndrisSevcenko thanks spoke to Craft on it and they said manual job or write a script based on https://github.com/craftcms/cms/blob/develop/src/migrations/m160804_110002_userphotos_to_assets.php.
Green17
CC BY-SA 4.0
2018-06-08T08:10:11.760Z
2018-06-08T08:10:11.760Z
Andris Sevcenko
<p>I followed the instructions in the docs at <a href="https://docs.craftcms.com/v3/changes-in-craft-3.html#user-photos" rel="nofollow noreferrer">https://docs.craftcms.com/v3/changes-in-craft-3.html#user-photos</a>.</p>

<p>I can browse the User Photos in the User Photos Asset Volume in the Control Panel. However, the User Photos are not linked to their respective User Accounts. I noticed that in the C3 <code>craft_users</code> table the <code>photoId</code> col is NULL. I can add an asset ID manually and the User Photo displays in the User Account in the CP.</p>

<p>I can upload new User Photos in User Accounts in the Users section of the CP.</p>

<p>How can I link the original Craft 2 User Photos to the User Accounts (ca. 100) in Craft 3?</p>

CC BY-SA 4.0
2018-06-07T21:54:22.967Z
are you saying that you have 100 user accounts and can't do this manually?
Clark Nelson
<assets><craft3><users>
Craft 2 to Craft 3 upgrade: User Photos not migrated to User Accounts
# Craft 2 to Craft 3 upgrade: User Photos not migrated to User Accounts

(Asked by: username_0 on 2018-06-07)

I followed the instructions in the docs at <https://docs.craftcms.com/v3/changes-in-craft-3.html#user-photos>.

I can browse the User Photos in the User Photos Asset Volume in the Control Panel. However, the User Photos are not linked to their respective User Accounts. I noticed that in the C3 `craft_users` table the `photoId` col is NULL. I can add an asset ID manually and the User Photo displays in the User Account in the CP.

I can upload new User Photos in User Accounts in the Users section of the CP.

How can I link the original Craft 2 User Photos to the User Accounts (ca. 100) in Craft 3?

**Tags:** assets, craft3, users

> **Comments:**
> **username_1**: are you saying that you have 100 user accounts and can't do this manually?  

---

## 2 answers

### Answer by username_0 on 2018-06-13. Score: 1 | Accepted answer

I solved the problem by adding the following (missing) step to the **Performing the Upgrade** section of the docs at <https://docs.craftcms.com/v3/upgrade.html#performing-the-upgrade>:

Copy your old `craft/storage/userphotos/` over to your new project's `storage/userphotos/`

> **Comments:**
> **username_0**: Docs have been updated at time of writing. See step 4 at https://docs.craftcms.com/v3/upgrade.html  

---

### Answer by username_2 on 2018-06-08. Score: 1

The migration should have taken care of that. The only scenario where it's not a bug I can imagine is if you ran the migration on a staging server that did not have the actual user photo files and then pushed the DB to live server. If that's not the case, can you get in touch via support@craftcms.com?

> **Comments:**
> **username_0**: Thanks Andris for confirming expected behaviour. I performed the upgrade in my local Homestead/Vagrant dev environment. It was a little while ago, so it would have been on an early RC. I wonder if this has anything to do with the recent issue of assets with leading underscores in file names not being indexed? Fortunately, this is a test upgrade, so I may just try again on the most recent RC. I'll let you know.  
> **username_0**: I tried a fresh upgrade from Craft 2.6.3017 to Craft 3.0.10.3 via Composer and got the same result. I noticed the Craft 3 upgrade process creates a storage/userphotos folder. However it is empty. I assume this makes sense because it doesn't know where to get the User Photos from. Is there a step missing in the **Performing the Upgrade** section that goes something like: "Copy your old craft/storage/userphotos over to your new project's storage/userphotos?  
> **username_3**: Is there any way to run just the userphotos part of the upgrade? - it seems the permissions where not right on our upgrade and the user photos did not update.  
> **username_2**: @username_3 that migration was pretty and not very reversible. The only way to re-do it would be to re-upgrade.  
> **username_3**: @AndrisSevcenko thanks spoke to Craft on it and they said manual job or write a script based on https://github.com/craftcms/cms/blob/develop/src/migrations/m160804_110002_userphotos_to_assets.php.  

---

